file-handler.ts
479 Bytes
import { Observable } from 'rxjs/Observable';
export interface FileHandler {
/**
* The donwload works as following:
* - if the file already exists and is not empty: trigger complete
* - if the download is in progress: trigger next (0-1 progress for percent of download)
* - if the download enters any error condition, trigger error and an already downloaded part of the file
*/
download(source:string, target:string) : Observable<number>;
}