import { a as BucketFile, F as FileInfo, W as WriteContent, c as WriteOptions, B as Bucket, b as BucketInfo } from '../types-ANca2IFa.js'; import { Blob } from 'node:buffer'; import { WritableStream } from 'node:stream/web'; declare class FSFile implements BucketFile { #private; name: string; path: string; constructor(key: string, root: string, prefix: string); slice(start: number, end?: number): FSFile; info(): Promise; exists(): Promise; text(): Promise; json(): Promise; arrayBuffer(): Promise; blob(): Promise; bytes(): Promise; write(content: WriteContent, _options?: WriteOptions): Promise; copyTo(dest: string | BucketFile): Promise; moveTo(dest: string | BucketFile): Promise; rename(name: string): Promise; remove(): Promise; unlink(): Promise; publicUrl(): Promise; signedUrl(_opts: { expires: number | string; }): Promise; uploadUrl(_opts: { expires: number | string; }): Promise; stream(): ReadableStream; nodeReadable(): NodeJS.ReadableStream; nodeWritable(_options?: WriteOptions): NodeJS.WritableStream; writable(_options?: WriteOptions): WritableStream; } declare class FileSystemBucket implements Bucket { #private; readonly type = "FILESYSTEM"; PREFIX: string; constructor(path: string, prefix?: string); get path(): string; info(): Promise; list(filter?: RegExp): Promise; file(name: string): FSFile; folder(path: string): FileSystemBucket; remove(filter?: RegExp): Promise; count(filter?: RegExp): Promise; scan(filter?: RegExp): AsyncGenerator; [Symbol.asyncIterator](): AsyncGenerator; } /** * Create a local filesystem bucket handle. * * All paths are relative to `path`, exactly like the remote providers: a * leading "/" means the bucket root (never the filesystem root), and nothing * ever resolves outside `path`; escapes throw a BucketError with code * "INVALID_PATH". `file.path` is the path within the bucket; the OS location * is `join(path, file.path)`. Nested directories are created automatically * on write. * * @param path - Root directory for all file operations * * @example * const bucket = FileSystem("./uploads"); * await bucket.file("hello.txt").write("hello"); */ declare function FileSystem(path: string): FileSystemBucket; export { Bucket, BucketFile, BucketInfo, FileInfo, WriteContent, WriteOptions, FileSystem as default };