UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

24 lines • 1.33 kB
import type { GDriveAccessor } from '../../accessor/gdrive.ts'; import { type FileStat, type PathSpec } from '../../types.ts'; import type { DriveFile } from '../google/drive.ts'; export interface DriveNode { id: string; name: string; mimeType: string; driveId: string | null; } export declare function rootContext(accessor: GDriveAccessor): Promise<[string, string | null]>; export declare function eaccesOnDenied<A extends unknown[], R>(fn: (...args: A) => Promise<R>): (...args: A) => Promise<R>; export declare function isFolder(node: DriveNode): boolean; export declare function driveTargetName(basename: string, mimeType: string): string; export declare function nodeFromItem(item: DriveFile, driveId: string | null): DriveNode; /** The Drive item a listed row names. Mirrors Python's `node_of`. */ export declare function nodeOf(row: FileStat): DriveNode; /** * The folder a create at `path` lands in: the mount root's, or what is at the * parent path. A missing or non-directory parent names the operand, as * mkdir(2) does. Answers [parent folder id, shared drive id | null]. Mirrors * Python's `parent_folder`. */ export declare function parentFolder(accessor: GDriveAccessor, path: PathSpec, parent: FileStat | null | undefined): Promise<[string, string | null]>; //# sourceMappingURL=resolve.d.ts.map