Add UnpackState and DownloadState
This commit is contained in:
@@ -23,6 +23,7 @@ class Host extends Injectable {
|
||||
_file_directory_delete_command = `rm -rf "%%RESOURCE%%"`
|
||||
_resolve_path_command = `readlink -f "%%PATH%%"`
|
||||
_reboot_command = `reboot`
|
||||
_change_directory_command = `cd "%%PATH%%"`
|
||||
|
||||
constructor(config) {
|
||||
super()
|
||||
@@ -106,6 +107,11 @@ class Host extends Injectable {
|
||||
await this.execute(this._file_directory_delete_command.replace('%%RESOURCE%%', resource_path))
|
||||
}
|
||||
|
||||
get_directory_change_command(path) {
|
||||
if ( typeof path !== 'string' ) path = path.path
|
||||
return this._change_directory_command.replace('%%PATH%%', path)
|
||||
}
|
||||
|
||||
async resolve_path(resource_path) {
|
||||
resource_path = typeof resource_path === 'string' ? resource_path : resource_path.path
|
||||
return this.run_line_result(this._resolve_path_command.replace('%%PATH%%', resource_path))
|
||||
|
||||
Reference in New Issue
Block a user