export interface ReadSeekCloser {
    read(size?: number): Uint8Array | null;
    readAll(): Uint8Array;
    seek(offset: number, whence?: number): number;
    close(): void;
    size(): number;
}
export interface FileReader {
    Open(): ReadSeekCloser;
}
export declare function ReadFileReaderBytes(reader: FileReader | null | undefined): Uint8Array;
export declare function ReadFileReaderBytesAsync(reader: FileReader | null | undefined): Promise<Uint8Array>;
export declare function ReadFileReaderSampleBytes(reader: FileReader | null | undefined, maxBytes?: number): Uint8Array;
export declare function ReadFileReaderSampleBytesAsync(reader: FileReader | null | undefined, maxBytes?: number): Promise<Uint8Array>;
export declare class File {
    Reader: FileReader | null;
    Name: string;
    OriginalName: string;
    Size: number;
    AsMap(): Record<string, unknown>;
    toJSON(): Record<string, unknown>;
}
export type MultipartFileHeader = {
    filename: string;
    size: number;
    buffer: Uint8Array;
};
export declare function NewFileFromPath(path: string): File;
export declare function NewFileFromPathWithOriginalName(path: string, originalName: string): File;
export declare function NewFileFromPathAsync(path: string): Promise<File>;
export declare function NewFileFromBytes(bytes: Uint8Array | null | undefined, name: string): File;
export declare function NewFileFromMultipart(header: MultipartFileHeader): File;
export declare function NewFileFromURL(ctx: AbortSignal | null, url: string): Promise<File>;
export declare class MultipartReader implements FileReader {
    #private;
    constructor(buffer: Uint8Array);
    Open(): ReadSeekCloser;
}
export declare class PathReader implements FileReader {
    Path: string;
    constructor(path: string);
    Open(): ReadSeekCloser;
}
export declare class BytesReader implements FileReader {
    Bytes: Uint8Array;
    constructor(bytes: Uint8Array);
    Open(): ReadSeekCloser;
}
export type OpenFuncAsReader = () => ReadSeekCloser;
export declare function openFuncAsReader(fn: OpenFuncAsReader): FileReader;
export declare function normalizeName(fr: FileReader, name: string): string;
export declare function normalizeNameAsync(fr: FileReader, name: string): Promise<string>;
export declare function extractExtension(name: string): string;
export declare function detectExtension(fr: FileReader): string | null;
export declare function detectExtensionAsync(fr: FileReader): Promise<string | null>;
export declare function detectMimeTypeFromBytes(raw: Uint8Array): string;
export declare function mimeToExtension(mime: string): string | null;
