@cloudcmd/read-files-sync
v2.0.2
Published
synchronously read files from a directory
Readme
Read Files Sync

Synchronously read files from a directory.
Install
npm i @cloudcmd/read-files-syncreadFilesSync(path[, mode])
pathstring - path to a directorymodestring - mode
const readFilesSync = require('@cloudcmd/read-files-sync');
readFilesSync('./fixture', 'utf8');
// returns
{
a: 'hello',
b: 'world',
}readFilesSync(path[, names, mode])
pathstring - path to a directorynamesarray - file names to readmodestring - mode
readFilesSync('./fixture', ['a'], 'utf8');
// returns
{
a: 'hello',
}Related
- fs-copy-file - Asynchronously copies src to dest.
- fs-copy-file-sync - Synchronously copies src to dest.
License
MIT
