@struktoai/mirage-core
Version:
A Unified Virtual Filesystem For AI Agents
48 lines • 2.33 kB
TypeScript
import { OneDriveAccessor, OneDriveConfig } from '../../accessor/onedrive.ts';
import type { DeltaHook } from '../../events/base.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';
export declare class OneDriveVFS extends BaseVFS {
readonly name: string;
readonly cachesReads: boolean;
readonly sizesAlwaysKnown: boolean;
readonly supportsSnapshot: boolean;
readonly readRevalidatable: boolean;
readonly indexTtl: number;
readonly wholeWordSearch: boolean;
readonly accessor: OneDriveAccessor;
private readonly config;
constructor(config: OneDriveConfig);
readonly readsRanges: boolean;
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>;
readTree(path: PathSpec, handed?: Handed): Promise<Map<string, FileStat> | null>;
write(path: PathSpec, data: ByteSource, signal?: AbortSignal): Promise<void>;
create(path: PathSpec): Promise<void>;
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>;
truncate(path: PathSpec, length: number, noCreate?: boolean): 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(): ConfigState<RedactedSchema<typeof OneDriveConfig>>;
}
//# sourceMappingURL=onedrive.d.ts.map