1 | import { FileSystem, VirtualFileSystem } from './interfaces';
|
2 | import { FileCache } from './file-cache';
|
3 | import { VirtualDirStats, VirtualFileStats } from './virtual-file-utils';
|
4 | export declare class HybridFileSystem implements FileSystem, VirtualFileSystem {
|
5 | private fileCache;
|
6 | private filesStats;
|
7 | private directoryStats;
|
8 | private inputFileSystem;
|
9 | private outputFileSystem;
|
10 | private writeToDisk;
|
11 | constructor(fileCache: FileCache);
|
12 | setInputFileSystem(fs: FileSystem): void;
|
13 | setOutputFileSystem(fs: FileSystem): void;
|
14 | setWriteToDisk(write: boolean): void;
|
15 | isSync(): boolean;
|
16 | stat(path: string, callback: Function): any;
|
17 | readdir(path: string, callback: Function): any;
|
18 | readJson(path: string, callback: Function): any;
|
19 | readlink(path: string, callback: Function): any;
|
20 | purge(pathsToPurge: string[]): void;
|
21 | readFile(path: string, callback: Function): any;
|
22 | addVirtualFile(filePath: string, fileContent: string): void;
|
23 | getFileContent(filePath: string): string;
|
24 | getDirectoryStats(path: string): VirtualDirStats;
|
25 | getSubDirs(directoryPath: string): string[];
|
26 | getFileNamesInDirectory(directoryPath: string): string[];
|
27 | getAllFileStats(): {
|
28 | [filePath: string]: VirtualFileStats;
|
29 | };
|
30 | getAllDirStats(): {
|
31 | [filePath: string]: VirtualDirStats;
|
32 | };
|
33 | mkdirp(filePath: string, callback: Function): void;
|
34 | mkdir(filePath: string, callback: Function): void;
|
35 | rmdir(filePath: string, callback: Function): void;
|
36 | unlink(filePath: string, callback: Function): void;
|
37 | join(dirPath: string, fileName: string): string;
|
38 | writeFile(filePath: string, fileContent: Buffer, callback: Function): void;
|
39 | }
|