FileHandler Interface


Handler for file system, and upload / download. TODO: Move this to parent directory -- it is not iModelHub-specific.


Name Description
basename(filePath: string): string Get file name from the path.  
downloadFile(requestContext: AuthorizedClientRequestContext, downloadUrl: string, path: string, fileSize?: number, progress?: (progress: ProgressInfo) => void): Promise<void> Download a file.  
exists(filePath: string): boolean Check if path exists.  
getFileSize(filePath: string): number Get size of a file.  
isDirectory(filePath: string): boolean Check if path is a directory.  
join(...paths: string[]): string Join multiple strings into a single path.  
uploadFile(requestContext: AuthorizedClientRequestContext, uploadUrlString: string, path: string, progress?: (progress: ProgressInfo) => void): Promise<void> Upload a file.  


Name Type Description
agent Agent    

Defined in

Last Updated: 08 January, 2020