You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
939 B

4 years ago
  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. }