/** * Get the files not selected. * * @return {Stream} */ rest() { const restStream = new Stream(null, null); restStream.on('end', leaf => { this._streams.push(leaf); }); return restStream; }
/** * 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; }