index.d.ts 1.6 KB

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