wfilesfiltersurrogate

0.5.24 • Public • Published

wFilesFilterSurrogate

Filter that works same like original provider, but additionally updates it own files tree cache. To perform behavior of original provider filter wraps its methods.

Installation

npm install wfilesfiltersurrogate

Usage

Options

  • tree { object } - map that contains filesTree;
  • original { object }[ optional, default : default provider on target platform ] - provider to wrap.

Please visit wFiles for information about providers.

Example #1
var rootPath = 'path/to/directory';
var filesTree = _.FileFilter.Surrogate.filesTreeMake( rootPath );
var filter = _.FileFilter.Surrogate
({
  tree : filesTree,
  original : _.FileProvider.Extract(),
  rootPath : rootPath
});
 
/* getting files list using absolute path */
var files = filter.directoryRead( rootPath );
console.log( files );

Dependents (0)

Package Sidebar

Install

npm i wfilesfiltersurrogate

Weekly Downloads

0

Version

0.5.24

License

MIT

Unpacked Size

36.8 kB

Total Files

7

Last publish

Collaborators

  • wandalen