import { Adapter, FilesError } from '../index.js'; 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; /** * Default expiry, in seconds, threaded into the `?expires=...` query * string of `signedUploadUrl()` for parity with the cloud adapters. A * dev upload-handler can validate it; the fs adapter itself does not * enforce expiry. Defaults to 3600 (1 hour). Per-call * `signedUploadUrl(key, { expiresIn })` overrides. * * `url()` ignores this — `file://` and static-server URLs don't expire. */ defaultUrlExpiresIn?: number; } type FsAdapter = Adapter<{ root: string; }> & { readonly root: string; }; declare const mapFsError: (err: unknown) => FilesError; declare const fs: (opts: FsAdapterOptions) => FsAdapter; export { type FsAdapter, type FsAdapterOptions, fs, mapFsError };