import { EventEmitter } from "node:events"; /** * StatPoller periodically stats a single file and emits 'change' when its * identity (inode), size, or modification time differs from the last * observation. * * It exists as a fallback for environments where native file-system events * are not delivered: cloud-synced folders (OneDrive, Dropbox, Google Drive) * updated from another machine, and network / WSL drvfs (9p) mounts that * never emit inotify events for changes made on the host side. * * A directory path is not polled: directory mtime only tracks entry * add/remove, not content edits, so it would produce noise without value. * * Events: * - 'change' (path): the file's stat signature changed since the last tick * - 'error' (error): stat failed for a reason other than ENOENT */ export declare class StatPoller extends EventEmitter { private readonly filePath; private readonly intervalMs; private timer; private lastSignature; private tickInFlight; constructor(filePath: string, intervalMs: number); /** * Seed the baseline signature and begin polling. * Resolves without starting when the path is a directory. */ start(): Promise; stop(): void; isRunning(): boolean; getIntervalMs(): number; private tick; } //# sourceMappingURL=stat-poller.d.ts.map