reader-async.d.ts 911 B

12345678910111213141516171819202122232425262728
  1. /// <reference types="node" />
  2. import * as readdir from '@mrmlnc/readdir-enhanced';
  3. import Reader from './reader';
  4. import FileSystemStream from '../adapters/fs-stream';
  5. import { ITask } from '../managers/tasks';
  6. import { EntryItem } from '../types/entries';
  7. export default class ReaderAsync extends Reader<Promise<EntryItem[]>> {
  8. /**
  9. * Returns FileSystem adapter.
  10. */
  11. readonly fsAdapter: FileSystemStream;
  12. /**
  13. * Use async API to read entries for Task.
  14. */
  15. read(task: ITask): Promise<EntryItem[]>;
  16. /**
  17. * Returns founded paths.
  18. */
  19. api(root: string, task: ITask, options: readdir.Options): NodeJS.ReadableStream;
  20. /**
  21. * Api for dynamic tasks.
  22. */
  23. dynamicApi(root: string, options: readdir.Options): NodeJS.ReadableStream;
  24. /**
  25. * Api for static tasks.
  26. */
  27. staticApi(task: ITask, options: readdir.Options): NodeJS.ReadableStream;
  28. }