/** @packageDocumentation
* @module iModelHub
*/
///
import * as https from "https";
import { AuthorizedClientRequestContext, FileHandler, ProgressCallback } from "@bentley/itwin-client";
/**
* Provides methods to work with the local file system. An instance of this class has to be provided to [[IModelClient]] for file upload/download methods to work.
* @internal
*/
export declare class LocalhostHandler implements FileHandler {
agent?: https.Agent;
/**
* Download a file.
* @param requestContext The client request context
* @param downloadUrl URL to download file from.
* @param path Path to download the file to, including file name.
* @param fileSize Size of the file that's being downloaded.
* @param progressCallback Callback for tracking progress.
*/
downloadFile(requestContext: AuthorizedClientRequestContext, downloadUrl: string, path: string, fileSize?: number, progress?: ProgressCallback): Promise;
/**
* Upload a file.
* @param requestContext The client request context
* @param uploadUrl URL to upload the file to.
* @param path Path of the file to be uploaded.
* @param progressCallback Callback for tracking progress.
*/
uploadFile(requestContext: AuthorizedClientRequestContext, uploadUrlString: string, path: string, progress?: ProgressCallback): Promise;
/**
* Get size of a file.
* @param filePath Path of the file.
* @returns Size of the file.
*/
getFileSize(filePath: string): number;
/**
* Check if path is a directory.
* @param filePath Path of the file.
* @returns True if path is directory.
*/
isDirectory(filePath: string): boolean;
/**
* Check if path exists.
* @param filePath Path of the file.
* @returns True if path exists.
*/
exists(filePath: string): boolean;
/**
* Deletes file.
* @param filePath Path of the file.
*/
unlink(filePath: string): void;
/**
* Get file name from the path.
* @param filePath Path of the file.
* @returns File name.
*/
basename(filePath: string): string;
/**
* Join multiple strings into a single path.
* @param paths Strings to join.
* @returns Joined path.
*/
join(...paths: string[]): string;
}
//# sourceMappingURL=LocalhostFileHandler.d.ts.map