init the awkward code

This commit is contained in:
Bao Nguyen
2023-02-13 19:32:10 +07:00
commit 27170afcac
5426 changed files with 1244579 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
/**
* Represents compressed file before extraction
*/
export class CompressedFile{
constructor(name,size,path,archiveRef){
this._name = name;
this._size = size;
this._path = path;
this._archiveRef = archiveRef;
}
/**
* file name
*/
get name(){
return this._name;
}
/**
* file size
*/
get size(){
return this._size;
}
/**
* Extract file from archive
* @returns {Promise<File>} extracted file
*/
extract(){
return this._archiveRef.extractSingleFile(this._path);
}
}