file-js

1.2.0 • Public • Published

file-js

NPM downloads Build Status Coverage Status github-issues stars forks

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

/file-js/

    Package Sidebar

    Install

    npm i file-js

    Weekly Downloads

    57,562

    Version

    1.2.0

    License

    Apache-2.0

    Unpacked Size

    3.01 MB

    Total Files

    127

    Last publish

    Collaborators

    • nspragg
    • jsonl