import { RServerConfig, Url, ErrorCallback } from '../@types';
import Request from './Request';
import Response from './Response';
import Logger from './Logger';
export default class FileServer {
    private config;
    private logger;
    private request;
    private response;
    private errorCallback;
    constructor(config: RServerConfig, logger: Logger, request: Request, response: Response, errorCallback: ErrorCallback | null);
    /**
     * 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>;
}
