/** * Local File Trigger Node - Version 1 * Triggers a workflow on file system changes */ export interface LocalFileTriggerV1Params { triggerOn?: 'file' | 'folder' | Expression; /** * File to Watch * @displayOptions.show { triggerOn: ["file"] } */ path?: string | Expression | PlaceholderValue; /** * The events to listen to * @displayOptions.show { triggerOn: ["folder"] } * @default [] */ events?: Array<'add' | 'change' | 'unlink' | 'addDir' | 'unlinkDir'>; options?: { /** Whether to wait until files finished writing to avoid partially read * @default false */ awaitWriteFinish?: boolean | Expression; /** Whether linked files/folders will also be watched (this includes symlinks, aliases on MacOS and shortcuts on Windows). Otherwise only the links themselves will be monitored). * @default true */ followSymlinks?: boolean | Expression; /** Files or paths to ignore. The whole path is tested, not just the filename. Supports <a href="https://github.com/micromatch/anymatch">Anymatch</a>- syntax. Regex patterns may not work on macOS. To ignore files based on substring matching, use the 'Ignore Mode' option with 'Contain'. */ ignored?: string | Expression | PlaceholderValue; /** Whether to ignore existing files/folders to not trigger an event * @default true */ ignoreInitial?: boolean | Expression; /** How deep into the folder structure to watch for changes * @default -1 */ depth?: 1 | 2 | 3 | 4 | 5 | 0 | -1 | Expression; /** Whether to use polling for watching. Typically necessary to successfully watch files over a network. * @default false */ usePolling?: boolean | Expression; /** Whether to ignore files using regex matching (Anymatch patterns) or by checking if the path contains a specified value * @default match */ ignoreMode?: 'match' | 'contain' | Expression; }; } interface LocalFileTriggerV1NodeBase { type: 'n8n-nodes-base.localFileTrigger'; version: 1; isTrigger: true; } export type LocalFileTriggerV1ParamsNode = LocalFileTriggerV1NodeBase & { config: NodeConfig; }; export type LocalFileTriggerV1Node = LocalFileTriggerV1ParamsNode;