extra-fs
/
3.0.79
extra-fs 3.0.79
Install from the command line:
Learn more about npm packages
$ npm install @nodef/extra-fs@3.0.79
Install via package.json:
"@nodef/extra-fs": "3.0.79"
About this version
Useful additions to inbuilt fs module.
📦 Node.js,
📜 Files,
📰 Docs.
Stability: Experimental.
const fs = require('extra-fs');
Property | Description |
---|---|
open | Open a file. |
close | Close a file. |
read | Read data from a file. |
write | Write data to a file. |
readv | Read an array of buffers from file. |
writev | Write an array of buffers to file. |
ftruncate | Shorten (truncate) a file. |
futimes | Change the file system timestamps of a file. |
fstat | Get information about a file. |
fchmod | Set the permissions of a file. |
fchown | Set the owner of a file. |
... | |
link | Create a hard link to a file or directory. |
symlink | Create a symbolic link to a file or directory. |
readlink | Read the contents of a symbolic link. |
realpath | Get canonical pathname by resolving ., .. |
lutimes | Change the file system timestamps of an object. |
lstat | Get information about a file, without dereferencing symbolic links. |
lchown | Set the owner of a symbolic link. |
... | |
readFile | Read the entire contents of a file. |
writeFile | Write data to the file, replace if it already exists. |
appendFile | Append data to a file, create if it does not exist. |
truncate | Shorten (truncate) a file. |
unlink | Remove a file or symbolic link. |
utimes | Change the file system timestamps of an object. |
stat | Get file status. |
copyFile | Copy source file to destination, overwite if exists. |
readFileText | Read file text with Unix EOL. |
writeFileText | Write file text with system EOL. |
readJson | Read JSON file as value. |
writeJson | Write object to JSON file. |
watchFile | Watch for changes on filename . |
unwatchFile | Stop watching for changes on filename . |
watch | Watch for changes on filename , where filename is either a file or a directory. |
createReadStream | Create a readable stream with 64kb highWaterMark . |
createWriteStream | Create a writeable stream from a desired start position. |
... | |
mkdir | Create a directory. |
mkdtemp | Create a unique temporary directory. |
opendir | Open a directory. |
readdir | Open a directory. |
rmdir | Remove a directory. |
dehuskdir | Remove outer one-item directories. |
... | |
access | Test a user's permissions for the file or directory. |
chmod | Change the permissions of a file. |
chown | Change owner and group of a file. |
rename | Rename/move a file or directory. |
cp | Copy source directory to destination, overwite if exists. |
rm | Remove a file or directory. |
exists | Check if file or directory exists. |
assertExists | Assert that a file or directory exists. |
assertNotExists | Assert that a file or directory does not exist. |