mira-app-server
Version:
Mira Server - standalone server application using mira-app-core
28 lines • 1.03 kB
TypeScript
import { LibraryServerDataSQLite } from 'mira-app-core/storage/sqlite';
import { MiraWebsocketServer } from './WebSocketServer';
export declare class LibraryWatcher {
private watcher;
private libraryService;
private libraryPath;
private libraryId;
private webSocketServer;
private pendingUnlinks;
private ignoredPaths;
private usePolling;
/** 基于 customFields 的同步过滤判定(黑名单/白名单,gitignore 语义) */
private shouldSync;
constructor(libraryService: LibraryServerDataSQLite, webSocketServer: MiraWebsocketServer);
start(): Promise<void>;
private startWatcher;
private initialSync;
private scanDir;
/** 文件是否应被忽略(不参与扫描/同步)。规则来自 createSyncFilter()。 */
private shouldIgnore;
ignorePath(filePath: string): void;
private isIgnored;
stop(): Promise<void>;
private handleUnlink;
private handleNewFile;
private resolveFolder;
}
//# sourceMappingURL=LibraryWatcher.d.ts.map