@struktoai/mirage-core
Version:
A Unified Virtual Filesystem For AI Agents
55 lines • 2.68 kB
TypeScript
import { DropboxAccessor } from '../../accessor/dropbox.ts';
import type { ConditionSupport, ReplaceRequest } from '../../cache/types.ts';
import { type DeltaHook } from '../../events/index.ts';
import type { ByteSource } from '../../io/types.ts';
import type { CapacityResult, DirListing, FileStat, PathSpec } from '../../types.ts';
import { BaseVFS } from '../base.ts';
import type { RedactedSchema } from '../secrets.ts';
import type { ConfigState, Handed } from '../types.ts';
import { DropboxConfig } from './config.ts';
export declare class DropboxVFS extends BaseVFS {
get conditionSupport(): ConditionSupport;
readonly name: string;
readonly cachesReads: boolean;
readonly sizesAlwaysKnown: boolean;
readonly readRevalidatable: boolean;
readonly indexTtl: number;
readonly handed: {
readonly read: readonly ["entry"];
readonly truncate: readonly ["entry"];
};
readonly wholeWordSearch: boolean;
readonly config: DropboxConfig;
readonly accessor: DropboxAccessor;
constructor(config: DropboxConfig);
readonly readsRanges: boolean;
readTree(path: PathSpec): Promise<Map<string, FileStat> | null>;
readdir(path: PathSpec, handed?: Handed): Promise<FileStat[] | DirListing>;
read(path: PathSpec, handed?: Handed, offset?: number, size?: number | null): Promise<ByteSource> | AsyncIterable<Uint8Array>;
stat(path: PathSpec): Promise<FileStat>;
exists(path: PathSpec): Promise<boolean>;
write(path: PathSpec, data: ByteSource, signal?: AbortSignal): Promise<FileStat | null>;
truncate(path: PathSpec, length: number, noCreate?: boolean, handed?: Handed): Promise<void>;
_replace(request: ReplaceRequest, signal?: AbortSignal): Promise<FileStat | null>;
create(path: PathSpec): Promise<FileStat | null>;
mkdir(path: PathSpec, parents?: boolean): Promise<void>;
unlink(path: PathSpec): Promise<void>;
rmdir(path: PathSpec): Promise<void>;
rmR(path: PathSpec): Promise<void>;
rename(src: PathSpec, dst: PathSpec): Promise<void>;
copy(src: PathSpec, dst: PathSpec): Promise<void>;
dirCopy(src: PathSpec, dst: PathSpec): Promise<void>;
/**
* Whether this VFS answers `name`; with no walk limit it reads every
* file rather than ask the service's search.
*/
supports(name: string): boolean;
filesContaining(path: PathSpec, text: string, opts: {
wholeWord: boolean;
ignoreCase: boolean;
}): Promise<PathSpec[] | null>;
capacity(): Promise<CapacityResult>;
deltaHook(): DeltaHook;
getState(): Promise<ConfigState<RedactedSchema<typeof DropboxConfig>>>;
}
//# sourceMappingURL=dropbox.d.ts.map