Skip to content

jordanarcherdev/node-fs-digger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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);

About

Returns information about files in filesystem

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published