UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

27 lines • 1.55 kB
import type { RedirectResult } from '../../../../context/session_context.ts'; import type { DispatchFn } from '../../../../runtime/types.ts'; import { PathSpec } from '../../../../types.ts'; import type { Namespace } from '../../../mount/namespace/namespace.ts'; import type { SessionState } from '../../../session/session.ts'; /** * One value the way getfattr prints it after `name=`. With no `-e` the * value is text when at most one byte in eight is unprintable (a * trailing NUL not counted) and base64 otherwise. Text escapes NUL, * newline and carriage return as octal and `"` and `\` with a backslash, * and passes every other byte through raw; a trailing NUL is dropped. * Mirrors Python's `encode_value`. */ export declare function encodeValue(value: Uint8Array, encoding: string | null): Uint8Array; /** * getfattr: print the extended attributes of each path. * * Debian's attr 2.5.2, pinned in docker: a `# file:` block per path that * has a matching attribute, names sorted, a blank line after each block, * `-d`/`-n` adding `="value"`, and the default match `^user\.` (`-m -` * matches every name). The attributes are the dispatcher's: what was set on * the path. `-h` reads a link's own attributes. `-R` stops after * `walkLimit` entries of a mount, as `ls -R` does, and exits 1. * Mirrors Python's `handle_getfattr`. */ export declare function handleGetfattr(namespace: Namespace, dispatch: DispatchFn, session: SessionState, args: (string | PathSpec)[]): Promise<RedirectResult>; //# sourceMappingURL=getfattr.d.ts.map