CoreFileSystemFileHandle.d.ts 1.3 KB

12345678910111213141516171819202122232425
  1. import { CoreFileSystemHandle } from './CoreFileSystemHandle';
  2. import { CoreFileSystemWritableFileStream } from './CoreFileSystemWritableFileStream';
  3. import type { CoreFsaContext, CreateWritableOptions, IFileSystemFileHandle, IFileSystemSyncAccessHandle } from './types';
  4. import type { Superblock } from '../core/Superblock';
  5. export declare class CoreFileSystemFileHandle extends CoreFileSystemHandle implements IFileSystemFileHandle {
  6. protected readonly _core: Superblock;
  7. readonly __path: string;
  8. protected readonly ctx: CoreFsaContext;
  9. constructor(_core: Superblock, __path: string, ctx?: Partial<CoreFsaContext>);
  10. /**
  11. * Returns a {@link Promise} which resolves to a {@link File} object
  12. * representing the state on disk of the entry represented by the handle.
  13. *
  14. * @see https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle/getFile
  15. */
  16. getFile(): Promise<File>;
  17. /**
  18. * @see https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle/createSyncAccessHandle
  19. */
  20. get createSyncAccessHandle(): undefined | (() => Promise<IFileSystemSyncAccessHandle>);
  21. /**
  22. * @see https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle/createWritable
  23. */
  24. createWritable({ keepExistingData }?: CreateWritableOptions): Promise<CoreFileSystemWritableFileStream>;
  25. }