Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
async-fs-wrapper
Advanced tools
Async wrappers for node's filesystem module
import { readdir, readFile } from 'async-fs-wrapper';
const fileContents = await readFile('./path/to/file.txt', { encoding: 'utf8' }); // get the content of a file
const filesNames = await readdir('./'); // list the files in a folder
console.log(fileNames); /* returns:
[
'.babelrc', '.codecov.yml',
'.eslintrc.js', '.git',
'.github', '.gitignore',
'.nvmrc', '.vscode',
'CHANGELOG.md', 'README.md',
'commitlint.config.js', 'coverage',
'dist', 'jest.config.js',
'node_modules', 'package-lock.json',
'package.json', 'prettier.config.js',
'src', 'tsconfig.json'
]
*/
Reads a file asynchronously
Returns Promise<Buffer> Resolves to the content of the file
Writes a file asynchronously
pointer
(string | Buffer) Path to the file to be writtencontent
(string | Buffer | Uint8Array) Content to write to the fileReturns Promise<void> Resolves with true if the write was successful
Appends to a file asynchronously
pointer
(string | Buffer) Path to the file to be writtencontent
(string | Buffer | Uint8Array) Content to write to the fileReturns Promise<void> Resolves with true if the write was successful
Reads a directory asynchronously
path
(string | Buffer) The directory to list the contents ofoptions
ReadDirOptions Options opject to pass to readdir (optional, default {}
)Returns Promise<Array<string>> Array of filenames
Copy a file asynchronously
Returns Promise<void> Resolves with true if the copy is successful
Copy all files in one directory to another directory
Returns Promise<void> Resolves when the op is complete
Create a directory
Returns Promise<void> Resolves when the op is complete
Remove a directory
Returns Promise<void> Resolves when the op is complete
Tests a user's permissions for the file or directory specified by pointer.
pointer
(string | Buffer) Path to the file to testmode
number? File access mode (optional, default 0
)Returns Promise<void>
Asynchronously removes a file or symbolic link.
pointer
Path Path to the file to removeReturns Promise<void>
FAQs
Async wrappers for node's filesystem module
The npm package async-fs-wrapper receives a total of 209 weekly downloads. As such, async-fs-wrapper popularity was classified as not popular.
We found that async-fs-wrapper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.