IModelJsFs Class

File system operations that are defined on all platforms. See also Platform and KnownLocations

Methods

Name Description
appendFileSync(path: string, str: string): void Static Append to a file.  
copySync(src: string, dest: string, opts?: any): void Static Make a copy of a file  
existsSync(path: string): boolean Static Does file or directory exist?  
lstatSync(path: string): IModelJsFsStats | undefined Static Get information about a file.  
mkdirSync(path: string): void Static Create a directory.  
readFileSync(path: string): string | Buffer Static Read file  
readdirSync(path: string): string[] Static Get the file and directory names in the specified directory.  
removeSync(path: string): void Static Delete a file or remove a directory (rm -r).  
rmdirSync(path: string): void Static Remove a directory.  
unlinkSync(path: string): void Static Delete a file.  
writeFileSync(path: string, data: string | Uint8Array, wflag: string = "w"): void Static Write to a file.  

Defined in

Last Updated: 03 June, 2019