Basic file system tools with easy to remember names
npm install fs-sync-utilsconst str = read('file.txt')write('out.txt', 'some text')remove('file.txt')if (exists('file.txt')) {…$ npm install --save fs-sync-utils js
const { read, write, exists, remove } = require('fs-sync-utils')// write
write('file.txt', 'some text')
// exists
if (exists('file.txt')) {
// read
const str = read('file.txt')
// remove
remove('file.txt')
}
``