reader-sync.d.ts 846 B

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