fs-sync.d.ts 673 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 FileSystemSync extends FileSystem<Entry[]> {
  8. /**
  9. * Use sync API to read entries for Task.
  10. */
  11. read(patterns: string[], filter: FilterFunction): Entry[];
  12. /**
  13. * Return entry for the provided path.
  14. */
  15. getEntry(filepath: string, pattern: Pattern): Entry | null;
  16. /**
  17. * Return fs.Stats for the provided path.
  18. */
  19. getStat(filepath: string): fs.Stats;
  20. }