import type { FilePath, FilePathWithPrefix, UXDataWriteOptions, UXFileInfo, UXFileInfoStub, UXFolderInfo, UXStat, } from "../../lib/src/common/types"; import type { CustomRegExp } from "../../lib/src/common/utils"; export interface StorageAccess { processWriteFile(file: UXFileInfoStub | FilePathWithPrefix, proc: () => Promise): Promise; processReadFile(file: UXFileInfoStub | FilePathWithPrefix, proc: () => Promise): Promise; isFileProcessing(file: UXFileInfoStub | FilePathWithPrefix): boolean; deleteVaultItem(file: FilePathWithPrefix | UXFileInfoStub | UXFolderInfo): Promise; writeFileAuto(path: string, data: string | ArrayBuffer, opt?: UXDataWriteOptions): Promise; readFileAuto(path: string): Promise; readFileText(path: string): Promise; isExists(path: string): Promise; writeHiddenFileAuto(path: string, data: string | ArrayBuffer, opt?: UXDataWriteOptions): Promise; appendHiddenFile(path: string, data: string, opt?: UXDataWriteOptions): Promise; stat(path: string): Promise; statHidden(path: string): Promise; removeHidden(path: string): Promise; readHiddenFileAuto(path: string): Promise; readHiddenFileBinary(path: string): Promise; readHiddenFileText(path: string): Promise; isExistsIncludeHidden(path: string): Promise; // This could be work also for the hidden files. ensureDir(path: string): Promise; triggerFileEvent(event: string, path: string): void; triggerHiddenFile(path: string): Promise; getFileStub(path: string): UXFileInfoStub | null; readStubContent(stub: UXFileInfoStub): Promise; getStub(path: string): UXFileInfoStub | UXFolderInfo | null; getFiles(): UXFileInfoStub[]; getFileNames(): FilePathWithPrefix[]; touched(file: UXFileInfoStub | FilePathWithPrefix): Promise; recentlyTouched(file: UXFileInfoStub | FilePathWithPrefix): boolean; clearTouched(): void; // -- Low-Level delete(file: FilePathWithPrefix | UXFileInfoStub | string, force: boolean): Promise; trash(file: FilePathWithPrefix | UXFileInfoStub | string, system: boolean): Promise; getFilesIncludeHidden( basePath: string, includeFilter?: CustomRegExp[], excludeFilter?: CustomRegExp[], skipFolder?: string[] ): Promise; }