2023-03-27 09:59:36 +03:00
|
|
|
/* tslint:disable */
|
|
|
|
/* eslint-disable */
|
|
|
|
|
|
|
|
/* auto-generated by NAPI-RS */
|
|
|
|
|
2023-05-10 12:16:48 +03:00
|
|
|
export interface WatchOptions {
|
|
|
|
recursive?: boolean;
|
2023-03-27 09:59:36 +03:00
|
|
|
}
|
2023-05-10 12:16:48 +03:00
|
|
|
/** Watcher kind enumeration */
|
2023-05-31 15:49:56 +03:00
|
|
|
export enum WatcherKind {
|
2023-05-10 12:16:48 +03:00
|
|
|
/** inotify backend (linux) */
|
|
|
|
Inotify = 'Inotify',
|
|
|
|
/** FS-Event backend (mac) */
|
|
|
|
Fsevent = 'Fsevent',
|
|
|
|
/** KQueue backend (bsd,optionally mac) */
|
|
|
|
Kqueue = 'Kqueue',
|
|
|
|
/** Polling based backend (fallback) */
|
|
|
|
PollWatcher = 'PollWatcher',
|
|
|
|
/** Windows backend */
|
|
|
|
ReadDirectoryChangesWatcher = 'ReadDirectoryChangesWatcher',
|
|
|
|
/** Fake watcher for testing */
|
|
|
|
NullWatcher = 'NullWatcher',
|
|
|
|
Unknown = 'Unknown',
|
|
|
|
}
|
2023-05-17 07:36:51 +03:00
|
|
|
export function moveFile(src: string, dst: string): Promise<void>;
|
2023-05-10 12:16:48 +03:00
|
|
|
export class Subscription {
|
2023-05-10 13:06:26 +03:00
|
|
|
toString(): string;
|
2023-05-10 12:16:48 +03:00
|
|
|
unsubscribe(): void;
|
|
|
|
}
|
|
|
|
export type FSWatcher = FsWatcher;
|
|
|
|
export class FsWatcher {
|
2023-05-17 07:36:51 +03:00
|
|
|
static watch(p: string, options?: WatchOptions | undefined | null): FsWatcher;
|
|
|
|
static kind(): WatcherKind;
|
2023-05-10 12:16:48 +03:00
|
|
|
toString(): string;
|
|
|
|
subscribe(
|
2023-05-10 13:06:26 +03:00
|
|
|
callback: (event: import('./event').NotifyEvent) => void,
|
|
|
|
errorCallback?: (err: Error) => void
|
2023-05-10 12:16:48 +03:00
|
|
|
): Subscription;
|
2023-05-17 07:36:51 +03:00
|
|
|
static unwatch(p: string): void;
|
|
|
|
static close(): void;
|
2023-03-27 09:59:36 +03:00
|
|
|
}
|