micro-fs
v1.0.3
Published
File system and globbing utilities
Downloads
5
Maintainers
Readme
micro-fs
File system and globbing utilities
Install
$ npm install micro-fs -S
Usage
const mfs = require('micro-fs');
mfs.copy('src/**/*.js', 'lib').then(() => {
console.log('copy done.');
});
mfs.move('src/**/*.js', 'lib').then(() => {
console.log('move done.');
});
mfs.delete('dist/**').then(() => {
console.log('delete done.');
});
mfs.zip('src/**/*.js', 'source.zip').then(() => {
console.log('archive done.');
});
mfs.glob('src/**/*.js', options).then(files => {
console.log(files);
/**
* [{ cwd, base, path }]
*/
});
API
mfs.copy(src, dest, options) => Promise
mfs.move(src, dest, options) => Promise
mfs.zip(src, dest, options) => Promise
mfs.glob(src, options) => Promise
mfs.delete(src, options) => Promise
src
is globs andoptions
are documented in glob-stream.
Report a issue
License
micro-fs is available under the terms of the MIT License.