NodePathFS.d.ts 790 B

12345678910111213141516171819202122
  1. /// <reference types="node" />
  2. /// <reference types="node" />
  3. /// <reference types="node" />
  4. import { URL } from 'url';
  5. import { FakeFS } from './FakeFS';
  6. import { ProxiedFS } from './ProxiedFS';
  7. import { NativePath } from './path';
  8. /**
  9. * Adds support for file URLs and Buffers to the wrapped `baseFs`, but *not* inside the typings.
  10. *
  11. * Only exists for compatibility with Node's behavior.
  12. *
  13. * Automatically wraps all FS instances passed to `patchFs` & `extendFs`.
  14. *
  15. * Don't use it!
  16. */
  17. export declare class NodePathFS extends ProxiedFS<NativePath, NativePath> {
  18. protected readonly baseFs: FakeFS<NativePath>;
  19. constructor(baseFs: FakeFS<NativePath>);
  20. protected mapFromBase(path: NativePath): NativePath;
  21. protected mapToBase(path: NativePath | URL | Buffer): string;
  22. }