1.2.0 • Published 6 years ago
file-js v1.2.0
file-js
Abstract representation of a pathname
Installation
npm install --save file-js
Demo
Features
- File glob matching
- File listings
- Assert file permissions
- Supports promises
- Supports synchronous and asynchronous methods
- Supports recursive operations (copy/delete)
Usage
const File = require('file-js');
const file = File.create('myDir');
const files = await file.getList();
files.forEach(console.log);
const file = File.create('myDirectory');
if (file.isDirectorySync()) {
console.log('processing directory');
}
Documentation
For more examples and API details, see API documentation
Test
npm test
To generate a test coverage report:
npm run coverage