| 28 | } |
| 29 | |
| 30 | export interface FileSystemEvents { |
| 31 | 'fs/init': { |
| 32 | files: FilesMap; |
| 33 | }; |
| 34 | |
| 35 | 'fs/readFile': |
| 36 | | [{ path: string; encoding?: undefined }, { data: Uint8Array }] |
| 37 | | [{ path: string; encoding?: 'buffer' }, { data: Uint8Array }] |
| 38 | | [{ path: string; encoding?: FSEncoding }, { data: string | FileContent }]; |
| 39 | |
| 40 | 'fs/writeFile': { |
| 41 | path: string; |
| 42 | content: FileContent; |
| 43 | encoding?: BufferEncoding; |
| 44 | recursive?: boolean; |
| 45 | }; |
| 46 | |
| 47 | 'fs/readdir': [ |
| 48 | { |
| 49 | path: string; |
| 50 | }, |
| 51 | { data: string[] } |
| 52 | ]; |
| 53 | |
| 54 | 'fs/stat': [ |
| 55 | { |
| 56 | path: string; |
| 57 | }, |
| 58 | { data: IFileStats } |
| 59 | ]; |
| 60 | |
| 61 | 'fs/mkdir': { |
| 62 | path: string; |
| 63 | recursive?: boolean; |
| 64 | }; |
| 65 | |
| 66 | 'fs/rm': { |
| 67 | path: string; |
| 68 | force?: boolean; |
| 69 | recursive?: boolean; |
| 70 | }; |
| 71 | |
| 72 | 'fs/watch': { |
| 73 | watcherId: string; |
| 74 | includes: string[]; |
| 75 | excludes: string[]; |
| 76 | }; |
| 77 | |
| 78 | 'fs/unwatch': { |
| 79 | watcherId: string; |
| 80 | }; |
| 81 | } |
| 82 | |
| 83 | type WriteFileOptions = BufferEncoding | { encoding?: BufferEncoding; recursive?: boolean }; |
| 84 |
nothing calls this directly
no outgoing calls
no test coverage detected