Plugin.FileAssociations
property · Plugin · cAlgo.API Since 5.1
DesktopCLICloud
Provides access to file associations.
Environment behaviour
CLI — not supported. Plugins cannot run in the CLI: ctrader-cli runs cBots only.
Cloud — not supported. Plugins cannot run in the cloud: it runs cBots only.
Definition
public FileAssociations FileAssociations {get;}
api.FileAssociations: FileAssociations
Returns FileAssociations
Examples
FileAssociations.Add(".mydata");
FileAssociations.FileOpened += args => Print("Opened file: {0}", args.FilePath);
api.FileAssociations.Add(".mydata")
api.FileAssociations.FileOpened += lambda args: api.Print(f"Opened file: {args.FilePath}")