import type { Adapter } from "../index.js"; import { FilesError } from "../internal/errors.js"; export interface FsAdapterOptions { /** * Absolute or relative directory the adapter manages. Created on first * upload if it doesn't exist. All operations are scoped to this root — * keys that resolve outside it (e.g. `../etc/passwd`) throw `Provider`. */ root: string; /** * Optional URL prefix for `url()`. When set, `url(key)` returns * `${urlBaseUrl}/${key}` — useful when a dev server (Next.js `/public` * mount, `serve-static`, etc.) is exposing the same root. When unset, * `url()` returns a `file://` URL — appropriate for CLIs/tests, not * for browsers. */ urlBaseUrl?: string; /** * Accepted for backward compatibility but ignored. `url()` returns a * `file://` or static-server URL, and `signedUploadUrl()` fails closed * because the fs adapter has no built-in upload signer or verifier. */ defaultUrlExpiresIn?: number; } export type FsAdapter = Adapter<{ root: string; }> & { readonly root: string; }; export declare const mapFsError: (err: unknown) => FilesError; export declare const fs: (opts: FsAdapterOptions) => FsAdapter; //# sourceMappingURL=index.d.ts.map