Example #1
0
 /**
  * Get the files not selected.
  * 
  * @return {Stream}
  */
 rest() {
     const restStream = new Stream(null, null);
     restStream.on('end', leaf => {
         this._streams.push(leaf);
     });
     return restStream;
 }
Example #2
0
 /**
  * Select some files matched the pattern.
  * 
  * @param  {string} pattern
  * @return {Stream}
  */
 pick(pattern) {
     if (!pattern || !isString(pattern)) {
         throw new Error(`A string pattern is required to pick up some files`);
     }
     const stream = new Stream(null, pattern);
     stream.on('end', leaf => {
         this._streams.push(leaf);
     });
     return stream;
 }