Standard library for interfacing with a filesystem.
var fs = require( '@stdlib/fs' );Standard library for interfacing with a filesystem.
var f = fs;
// returns {...}exists( path, clbk ): test whether a path exists on the filesystem.readDir( path, clbk ): read the contents of a directory.readFile( file, [options,] clbk ): read the entire contents of a file.readFileList( filepaths, [options,] clbk ): read the entire contents of each file in a file list.readJSON( file, [options,] clbk ): read a file as JSON.readWASM( file, [options,] clbk ): read a file as WebAssembly.rename( oldPath, newPath, clbk ): rename a file.resolveParentPath( path, [options,] clbk ): resolve a path by walking parent directories.unlink( path, clbk ): remove a directory entry.writeFile( file, data, [options,] clbk ): write data to a file.
var objectKeys = require( '@stdlib/utils/keys' );
var fs = require( '@stdlib/fs' );
console.log( objectKeys( fs ) );