Async wrappers for node's filesystem module
npm install async-fs-wrapper   
Async wrappers for node's filesystem module
``typescript
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'
]
*/
`
#### Table of Contents
* readFile
* Parameters
* writeFile
* Parameters
* appendFile
* Parameters
* readdir
* Parameters
* copyFile
* Parameters
* copyAllFilesInDir
* Parameters
* mkdir
* Parameters
* rmdir
* Parameters
* access
* Parameters
* unlink
* Parameters
Reads a file asynchronously
#### Parameters
* pointer (string | Buffer) Path to the file to be readoptions
* ReadFileOptions (optional, default {})
Returns Promise<Buffer> Resolves to the content of the file
Writes a file asynchronously
#### Parameters
* pointer (string | Buffer) Path to the file to be writtencontent
* (string | Buffer | Uint8Array) Content to write to the file
Returns Promise\
Appends to a file asynchronously
#### Parameters
* pointer (string | Buffer) Path to the file to be writtencontent
* (string | Buffer | Uint8Array) Content to write to the file
Returns Promise\
Reads a directory asynchronously
#### Parameters
* 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
#### Parameters
* from (string | Buffer) The src fileto
* (string | Buffer) The dest file
Returns Promise\
Copy all files in one directory to another directory
#### Parameters
* from (string | Buffer) Input directoryto
* (string | Buffer) Output directory
Returns Promise\
Create a directory
#### Parameters
* pointer (string | Buffer) Path to the directory to createopts
* any?
Returns Promise\
Remove a directory
#### Parameters
* pointer (string | Buffer) Path to the directory to removeopts
* fs.RmDirOptions?
Returns Promise\
Tests a user's permissions for the file or directory specified by pointer.
#### Parameters
* pointer (string | Buffer) Path to the file to testmode
* number? File access mode (optional, default 0)
Returns Promise\
Asynchronously removes a file or symbolic link.
#### Parameters
* pointer` Path Path to the file to remove
Returns Promise\