Not Particularly Meaningful
    Have ideas to improve npm?Join in the discussion! »

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

    Install

    npm i wfilesfiltersurrogate

    DownloadsWeekly Downloads

    16

    Version

    0.5.24

    License

    MIT

    Unpacked Size

    36.8 kB

    Total Files

    7

    Last publish

    Collaborators

    • avatar