@struktoai/mirage-core
Version:
A Unified Virtual Filesystem For AI Agents
29 lines • 993 B
TypeScript
import type { PosixStat } from '../stat.ts';
import type { VFSEntry, VFSStat } from '../types.ts';
/**
* The preview1 filetype for one stat or listing row.
*
* @param row - the row to classify; a listing row with no mode is one
* the file adapter could not classify.
*/
export declare function filetypeOf(row: VFSStat | VFSEntry): number;
/**
* Encode a prestat record for a preopened directory.
*
* @param nameLength - byte length of the preopen's guest path.
*/
export declare function packPrestat(nameLength: number): Uint8Array;
/**
* Encode an fdstat record reporting full rights.
*
* @param filetype - preview1 filetype of the descriptor.
*/
export declare function packFdstat(filetype: number): Uint8Array;
/**
* Encode a filestat record from the stat every runtime shares.
*
* @param st - the path's stat.
* @param filetype - preview1 filetype.
*/
export declare function packFilestat(st: PosixStat, filetype: number): Uint8Array;
//# sourceMappingURL=stat.d.ts.map