Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/d-band/micro-fs
File system and globbing utilities
https://github.com/d-band/micro-fs
copy delete filesystem fs glob move promise
Last synced: about 1 month ago
JSON representation
File system and globbing utilities
- Host: GitHub
- URL: https://github.com/d-band/micro-fs
- Owner: d-band
- Created: 2019-08-06T05:12:08.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-11-30T14:59:19.000Z (about 1 year ago)
- Last Synced: 2024-04-28T03:17:11.620Z (8 months ago)
- Topics: copy, delete, filesystem, fs, glob, move, promise
- Language: JavaScript
- Size: 10.7 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
micro-fs
========> File system and globbing utilities
[![NPM version](https://img.shields.io/npm/v/micro-fs.svg)](https://www.npmjs.com/package/micro-fs)
[![NPM downloads](https://img.shields.io/npm/dm/micro-fs.svg)](https://www.npmjs.com/package/micro-fs)
[![Build Status](https://travis-ci.org/d-band/micro-fs.svg?branch=master)](https://travis-ci.org/d-band/micro-fs)
[![Coverage Status](https://coveralls.io/repos/github/d-band/micro-fs/badge.svg?branch=master)](https://coveralls.io/github/d-band/micro-fs?branch=master)
[![Dependency Status](https://david-dm.org/d-band/micro-fs.svg)](https://david-dm.org/d-band/micro-fs)
[![Greenkeeper badge](https://badges.greenkeeper.io/d-band/micro-fs.svg)](https://greenkeeper.io/)---
## Install
```bash
$ npm install micro-fs -S
```## Usage
```js
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](https://www.npmjs.com/package/glob-stream).
## Report a issue
* [All issues](https://github.com/d-band/micro-fs/issues)
* [New issue](https://github.com/d-band/micro-fs/issues/new)## License
micro-fs is available under the terms of the MIT License.