@file-services/directory
v7.2.0
Published
A file system wrapper that adds directory scoping to any `IFileSystem` implementation.
Downloads
61
Readme
@file-services/directory
A file system wrapper that adds directory scoping to any IFileSystem
implementation.
Getting started
Install library in project:
npm i @file-services/directory
Then, use the programmatic API:
import { nodeFs } from '@file-services/node';
import { createDirectoryFs } from '@file-services/directory';
const directoryFs = createDirectoryFs(nodeFs, '/path/to/some/folder');
// will be written to /path/to/some/folder/file.js
directoryFs.writeFileSync('/file.js', 'SAMPLE');
// returns 'SAMPLE'
directoryFs.readFileSync('/file.js');
License
MIT