/** * Read/Write Files from Disk Node - Version 1.1 * Read or write files from the computer that runs n8n */ export interface ReadWriteFileV11Params { operation?: 'read' | 'write'; /** * Specify a file's path or path pattern to read multiple files. Always use forward-slashes for path separator even on Windows. * @hint Supports patterns, learn more <a href="https://github.com/micromatch/picomatch#basic-globbing" target="_blank">here</a> * @displayOptions.show { operation: ["read"] } */ fileSelector?: string | Expression | PlaceholderValue; /** * Options * @displayOptions.show { operation: ["read", "write"] } * @default {} */ options?: { /** Extension of the file in the output binary */ fileExtension?: string | Expression | PlaceholderValue; /** Name of the file in the output binary */ fileName?: string | Expression | PlaceholderValue; /** Mime type of the file in the output binary */ mimeType?: string | Expression | PlaceholderValue; /** By default 'data' is used * @hint The name of the output binary field to put the file in * @default data */ dataPropertyName?: string | Expression | PlaceholderValue; /** Whether to append to an existing file. While it's commonly used with text files, it's not limited to them, however, it wouldn't be applicable for file types that have a specific structure like most binary formats. * @default false */ append?: boolean | Expression; }; /** * Path and name of the file that should be written. Also include the file extension. * @displayOptions.show { operation: ["write"] } */ fileName?: string | Expression | PlaceholderValue; /** * Input Binary Field * @hint The name of the input binary field containing the file to be written * @displayOptions.show { operation: ["write"] } * @default data */ dataPropertyName?: string | Expression | PlaceholderValue; } interface ReadWriteFileV11NodeBase { type: 'n8n-nodes-base.readWriteFile'; version: 1.1; } export type ReadWriteFileV11ParamsNode = ReadWriteFileV11NodeBase & { config: NodeConfig; }; export type ReadWriteFileV11Node = ReadWriteFileV11ParamsNode;