UNPKG

image-asset-manager

Version:

A comprehensive image asset management tool for frontend projects

37 lines 1.2 kB
import { EventEmitter } from "events"; import { ImageFile, FileScanner } from "../types"; export interface FileChangeEvent { type: "add" | "change" | "unlink"; path: string; file?: ImageFile; } export interface WatchOptions { ignored: string[]; persistent: boolean; ignoreInitial: boolean; followSymlinks: boolean; depth: number; } export interface FileWatcher { watch(path: string, options: WatchOptions): void; unwatch(): void; onFileChange(callback: (event: FileChangeEvent) => void): void; } export declare class FileWatcherImpl extends EventEmitter implements FileWatcher { private watcher; private fileScanner; private watchedPath; private isWatching; constructor(fileScanner: FileScanner); watch(watchPath: string, options: WatchOptions): void; unwatch(): void; onFileChange(callback: (event: FileChangeEvent) => void): void; private setupEventHandlers; private processFileChange; private isImageFile; private emitFileChange; isWatchingPath(): boolean; getWatchedPath(): string; handleIncrementalUpdate(event: FileChangeEvent): Promise<void>; } //# sourceMappingURL=FileWatcher.d.ts.map