This commit is contained in:
2024-04-18 21:12:37 +02:00
commit 78abae13b7
76 changed files with 8565 additions and 0 deletions

17
dist_ts/watcher_poller.d.ts vendored Normal file
View File

@@ -0,0 +1,17 @@
import { FileType, TargetEvent } from './enums.js';
import LazyMapSet from './lazy_map_set.js';
import WatcherStats from './watcher_stats.js';
import type { INO, Path } from './types.js';
declare class WatcherPoller {
inos: Partial<Record<TargetEvent, Record<Path, [INO, FileType]>>>;
paths: LazyMapSet<INO, Path>;
stats: Map<Path, WatcherStats>;
getIno(targetPath: Path, event: TargetEvent, type?: FileType): INO | undefined;
getStats(targetPath: Path): WatcherStats | undefined;
poll(targetPath: Path, timeout?: number): Promise<WatcherStats | undefined>;
reset(): void;
update(targetPath: Path, timeout?: number): Promise<TargetEvent[]>;
updateIno(targetPath: Path, event: TargetEvent, stats: WatcherStats): void;
updateStats(targetPath: Path, stats?: WatcherStats): void;
}
export default WatcherPoller;