---
id: "T:cAlgo.API.FileAssociationsFileOpenedEventArgs"
kind: "class"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/EventArgs/FileAssociationsFileOpenedEventArgs/"
---

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

# FileAssociationsFileOpenedEventArgs (class)

Provides data for plugin file associations file opened event.

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

- CLI: Available to plugins only, and plugins cannot run in the CLI.
- Cloud: Available to plugins only, and plugins cannot run in the cloud.

## Definition

```csharp
public class FileAssociationsFileOpenedEventArgs
```

Available since cAlgo.API 5.1.

## Examples

C#:

```csharp
protected override void OnStart()
{
    FileAssociations.Add("csv");
    FileAssociations.FileOpened += OnFileOpened;
}

private void OnFileOpened(FileAssociationsFileOpenedEventArgs args)
{
    Print("File opened: {0}", args.FilePath);
}
```

Python:

```python
def on_start(self):
    api.FileAssociations.Add("csv")
    api.FileAssociations.FileOpened += self.on_file_opened

def on_file_opened(self, args):
    api.Print(f"File opened: {args.FilePath}")
```

## Properties

- `public string FilePath {get;}` — Gets opened file path. [details](https://help.ctrader.com/ctrader-algo/references/EventArgs/FileAssociationsFileOpenedEventArgs/FilePath/index.md)

