import { RServerConfig, Url } from '../@types';
import type { Request } from './Request';
import type { Response } from './Response';
export declare class FileServer {
    private config;
    private request;
    private response;
    constructor(config: RServerConfig, request: Request, response: Response);
    /**
     * ends the response.
     */
    private endResponse;
    /**
     * ends the streaming response
     */
    private endStream;
    /**
     * validates range request content.
     * @see https://tools.ietf.org/html/rfc7233
     */
    private validateRangeRequest;
    /**
     * check if file is not modified
     */
    private fileNotModified;
    /**
     * computes and returns a files eTag
     */
    private computeETag;
    /**
     * returns default response headers
     */
    private getDefaultHeaders;
    /**
     * process file
     */
    private process;
    /**
     * returns the directory's default document if any
     */
    private getDefaultDocument;
    /**
     * validates the request method and returns the public file or directory path that
     * matches the request url
     */
    private validateRequest;
    /**
     * serves a static file response back to the client
     */
    serve(url: Url): Promise<boolean>;
    /**
     * serves server http error files. such as 504, 404, etc
     */
    serveHttpErrorFile(status: number): Promise<boolean>;
    /**
     * serves file intended for download to the client
     */
    serveDownload(filePath: string, filename?: string): Promise<boolean>;
}
