---
id: "P:cAlgo.API.Plugin.FileAssociations"
kind: "property"
type: "T:cAlgo.API.Plugin"
url: "https://help.ctrader.com/ctrader-algo/references/General/Plugin/FileAssociations/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# Plugin.FileAssociations

Member of [Plugin](https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md).

## FileAssociations

Provides access to file associations.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Plugins cannot run in the CLI: ctrader-cli runs cBots only.
- Cloud: Plugins cannot run in the cloud: it runs cBots only.

C#:

```csharp
public FileAssociations FileAssociations {get;}
```

Python:

```python
api.FileAssociations: FileAssociations
```

### Returns

`FileAssociations` — 

Available since cAlgo.API 5.1.

### Examples

C#:

```csharp
FileAssociations.Add(".mydata");
FileAssociations.FileOpened += args => Print("Opened file: {0}", args.FilePath);
```

Python:

```python
api.FileAssociations.Add(".mydata")
api.FileAssociations.FileOpened += lambda args: api.Print(f"Opened file: {args.FilePath}")
```

