import type { Backend, BackendConfiguration, FilesystemOf, SharedConfig } from './backends/backend.js'; import type { Device, DeviceDriver } from './internal/devices.js'; import { log } from 'kerium'; import { FileSystem } from './internal/filesystem.js'; /** * Update the configuration of a file system. * @category Backends and Configuration */ export declare function configureFileSystem(fs: FileSystem, config: SharedConfig): void; /** * Configuration for a specific mount point * @category Backends and Configuration */ export type MountConfiguration = FilesystemOf | BackendConfiguration | T; /** * Retrieve a file system with `configuration`. * @category Backends and Configuration * @see MountConfiguration */ export declare function resolveMountConfig(configuration: MountConfiguration, _depth?: number): Promise>; /** * @experimental * Retrieve a file system with `configuration`. * @category Backends and Configuration * @see MountConfiguration */ export declare function resolveMountConfigSync(configuration: MountConfiguration, _depth?: number): FilesystemOf; /** * An object mapping mount points to backends * @category Backends and Configuration */ export interface ConfigMounts { [K: string]: Backend; } /** * Configuration * @category Backends and Configuration */ export interface Configuration extends SharedConfig { /** * An object mapping mount points to mount configuration */ mounts: { [K in keyof T]: MountConfiguration; }; /** * The uid to use * @default 0 */ uid: number; /** * The gid to use * @default 0 */ gid: number; /** * Whether to automatically add normal Linux devices * @default false */ addDevices: boolean; /** * Whether to automatically create some directories (e.g. /tmp) * @default false */ defaultDirectories: boolean; /** * If true, disables *all* permissions checking. * * This can increase performance. * @default false */ disableAccessChecks: boolean; /** * If true, files will only sync to the file system when closed. * This overrides `disableUpdateOnRead` * * This can increase performance. * @experimental * @default false */ onlySyncOnClose: boolean; /** * Configurations options for the log. */ log: log.Configuration; } /** * Configures ZenFS with single mount point / * @category Backends and Configuration */ export declare function configureSingle(configuration: MountConfiguration): Promise; /** * @experimental * Configures ZenFS with single mount point / * @category Backends and Configuration */ export declare function configureSingleSync(configuration: MountConfiguration): void; /** * @category Backends and Configuration */ export declare function addDevice(driver: DeviceDriver, options?: object): Device; /** * Configures ZenFS with `configuration` * @category Backends and Configuration * @see Configuration */ export declare function configure(configuration: Partial>): Promise; /** * @experimental * Configures ZenFS with `configuration` * @category Backends and Configuration * @see Configuration */ export declare function configureSync(configuration: Partial>): void; export declare function sync(): Promise;