import { t } from '../common'; declare type FilePath = string; declare type DirPath = string; export declare type FsFileInfo = { kind: 'file' | 'dir' | 'unknown'; path: FilePath; exists: boolean; hash: string; bytes: number; }; export declare type Fs = { is: FsIs; json: FsJson; manifest: FsGetManifest; info: FsInfoMethod; exists: FsExistsMethod; read: FsReadMethod; write: FsWriteMethod; copy: FsCopyMethod; move: FsMoveMethod; delete: FsDeleteMethod; join: FsJoin; dir(path: DirPath): Fs; }; declare type FsGetManifest = (options?: FsGetManifestOptions) => Promise; declare type FsGetManifestOptions = t.FsIndexerGetManifestOptions & { cache?: boolean | 'force' | 'remove'; cachefile?: string; }; declare type FsInfoMethod = (path: FilePath) => Promise; declare type FsExistsMethod = (path: FilePath) => Promise; declare type FsReadMethod = (path: FilePath) => Promise; declare type FsWriteMethod = (path: FilePath, data: FsWriteMethodData) => Promise; declare type FsWriteMethodData = t.Json | Uint8Array | ReadableStream; declare type FsWriteMethodResponse = { hash: string; bytes: number; }; declare type FsCopyMethod = (source: FilePath, target: FilePath) => Promise; declare type FsMoveMethod = (source: FilePath, target: FilePath) => Promise; declare type FsDeleteMethod = (path: FilePath) => Promise; declare type FsIs = { dir(path: FilePath): Promise; file(path: FilePath): Promise; }; declare type FsJoin = (...segments: string[]) => string; declare type FsJson = { read(path: FilePath): Promise | undefined; write(path: FilePath, data: t.Json): Promise; }; export {};