index.d.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132
  1. import { CoreFileSystemDirectoryHandle } from './CoreFileSystemDirectoryHandle';
  2. import { CoreFsaContext, IFileSystemObserverConstructable } from './types';
  3. import { Superblock } from '../core/Superblock';
  4. export * from './types';
  5. export * from './CoreFileSystemHandle';
  6. export * from './CoreFileSystemDirectoryHandle';
  7. export * from './CoreFileSystemFileHandle';
  8. export * from './CoreFileSystemSyncAccessHandle';
  9. export * from './CoreFileSystemWritableFileStream';
  10. export * from './CoreFileSystemObserver';
  11. export * from './CorePermissionStatus';
  12. /**
  13. * Create a new instance of an in-memory File System Access API
  14. * implementation rooted at the root directory of the filesystem.
  15. *
  16. * @param ctx Optional context for the File System Access API.
  17. * @param core Optional low-level file system implementation to
  18. * back the File System Access API. If not provided, a new empty
  19. * Superblock instance will be created.
  20. * @param dirPath Optional path within the filesystem to use as the root
  21. * directory of the File System Access API. Defaults to `/`.
  22. * @returns A File System Access API implementation `dir` rooted at
  23. * the root directory of the filesystem, as well as the `core`,
  24. * a low-level file system implementation itself. Also, returns
  25. * `FileSystemObserver`, a class that can be used to create
  26. * observers that watch for changes to files and directories.
  27. */
  28. export declare const fsa: (ctx?: Partial<CoreFsaContext>, core?: Superblock, dirPath?: string) => {
  29. core: Superblock;
  30. dir: CoreFileSystemDirectoryHandle;
  31. FileSystemObserver: IFileSystemObserverConstructable;
  32. };