fs-digger
v1.0.1
Published
A node_module for digging through the file system
Downloads
1
Readme
node-fs-digger
Searches through the filesystem from a given file and returns information based on input query.
Installation
In your command Line enter
npm install --save fs-digger
Usage
Require the package in your project
const digger = require('fs-digger');
To return an object listing the file system and its contents
let startPath = './your_starting_folder';
let result = digger.dig(startPath);
console.log(result)
To return information about all files matching an extension:
let startPath = './your_starting_folder';
let ext = 'mp4';
let result = digger.mineFileExt(startPath, ext);
To return all files matching a query by name (note, do not add extension)
let startPath = './your_starting_folder';
let query = 'hello-world';
let result = digger.mineFileExt(startPath, query);