mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-20 14:41:34 +03:00
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
|
|
/* auto-generated by NAPI-RS */
|
|
|
|
export interface WatchOptions {
|
|
recursive?: boolean;
|
|
}
|
|
/** Watcher kind enumeration */
|
|
export const enum WatcherKind {
|
|
/** 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',
|
|
}
|
|
export function moveFile(src: string, dst: string): Promise<void>;
|
|
export class Subscription {
|
|
toString(): string;
|
|
unsubscribe(): void;
|
|
}
|
|
export type FSWatcher = FsWatcher;
|
|
export class FsWatcher {
|
|
static watch(p: string, options?: WatchOptions | undefined | null): FsWatcher;
|
|
static kind(): WatcherKind;
|
|
toString(): string;
|
|
subscribe(
|
|
callback: (event: import('./event').NotifyEvent) => void,
|
|
errorCallback?: (err: Error) => void
|
|
): Subscription;
|
|
static unwatch(p: string): void;
|
|
static close(): void;
|
|
}
|