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.

20 lines
673 B

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