UNPKG

@enjoys/react-api

Version:
21 lines (18 loc) 565 B
declare class OFSManager { private rootHandle; constructor(); requestAccess(): Promise<void>; fileExists(path: string): Promise<boolean>; isAllowed(): Promise<boolean>; readFile(path: string): Promise<string>; writeFile(path: string, contents: string | Blob): Promise<void>; deleteFile(path: string): Promise<void>; private getFileHandle; } declare function useOFS(): { ofs: OFSManager; ready: boolean; requestAccess: () => Promise<void>; checkPermission: () => Promise<void>; }; export { OFSManager, useOFS };