import { Result } from '@standardnotes/domain-core' import { PathLike } from 'fs' export interface FilesManagerInterface { debouncedJSONDiskWriter(durationMs: number, location: string, data: () => unknown): () => void openDirectoryPicker(buttonLabel?: string): Promise readJSONFile(filepath: string): Promise readJSONFileSync(filepath: string): T writeJSONFile(filepath: string, data: unknown): Promise writeFile(filepath: string, data: string): Promise writeJSONFileSync(filepath: string, data: unknown): void ensureDirectoryExists(dirPath: string): Promise deleteDir(dirPath: string): Promise> deleteDirContents(dirPath: string): Promise isChildOfDir(parent: string, potentialChild: string): boolean moveDirectory(dir: string, destination: string): Promise> moveDirContents(srcDir: string, destDir: string): Promise> extractZip(source: string, dest: string): Promise moveFiles(sources: string[], destDir: string): Promise moveFile(source: PathLike, destination: PathLike): Promise deleteFileIfExists(filePath: PathLike): Promise deleteFile(filePath: PathLike): Promise }