Skip to content

d-band/micro-fs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

micro-fs

File system and globbing utilities

NPM version NPM downloads Build Status Coverage Status Dependency Status Greenkeeper badge


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 and options are documented in glob-stream.

Report a issue

License

micro-fs is available under the terms of the MIT License.