FileSystem
Summary
Functions
FileSystem.readFile(path: string) → stringFileSystem.readDir(path: string) → { string }FileSystem.readDirEntries(path: string) → { { name: string, kind: string } }FileSystem.stat(path: string) → { kind: string, modified: number?, size: number? }FileSystem.watch(path: string, callback: (path: string, events: { string }) -> ()) → { stop: () -> () }FileSystem.writeDir(path: string)FileSystem.writeFile(path: string, contents: string)FileSystem.removeDir(path: string)FileSystem.removeFile(path: string)FileSystem.isFile(path: string) → booleanFileSystem.isDir(path: string) → booleanFunctions
Section titled “Functions”readFile
Section titled “readFile”FileSystem . readFile ( path ) -> string
readDir
Section titled “readDir”FileSystem . readDir ( path ) -> { string }
Parameters
| path: string |
Returns
| { string } |
readDirEntries
Section titled “readDirEntries”FileSystem . readDirEntries ( path ) -> { { name: string, kind: string } }
FileSystem . stat ( path ) -> { kind: string, modified: number?, size: number? }
FileSystem . watch ( path , callback ) -> { stop: () -> () }
Parameters
| path: string | |
| callback: (path: string, events: { string }) -> () |
Returns
| { { stop: () -> () } } |
writeDir
Section titled “writeDir”FileSystem . writeDir ( path ) -> ()
Parameters
| path: string |
writeFile
Section titled “writeFile”FileSystem . writeFile ( path , contents ) -> ()
removeDir
Section titled “removeDir”FileSystem . removeDir ( path ) -> ()
Parameters
| path: string |
removeFile
Section titled “removeFile”FileSystem . removeFile ( path ) -> ()
Parameters
| path: string |
isFile
Section titled “isFile”FileSystem . isFile ( path ) -> boolean
FileSystem . isDir ( path ) -> boolean