fs-stream.d.ts 703 B

1234567891011121314151617181920
  1. /// <reference types="node" />
  2. import * as fs from 'fs';
  3. import FileSystem from './fs';
  4. import { FilterFunction } from '@mrmlnc/readdir-enhanced';
  5. import { Entry } from '../types/entries';
  6. import { Pattern } from '../types/patterns';
  7. export default class FileSystemStream extends FileSystem<NodeJS.ReadableStream> {
  8. /**
  9. * Use stream API to read entries for Task.
  10. */
  11. read(patterns: string[], filter: FilterFunction): NodeJS.ReadableStream;
  12. /**
  13. * Return entry for the provided path.
  14. */
  15. getEntry(filepath: string, pattern: Pattern): Promise<Entry | null>;
  16. /**
  17. * Return fs.Stats for the provided path.
  18. */
  19. getStat(filepath: string): Promise<fs.Stats>;
  20. }