Add unpack state, command not found errors
This commit is contained in:
@@ -63,6 +63,16 @@ class UniversalPath extends Injectable {
|
||||
return path.dirname(this.path)
|
||||
}
|
||||
|
||||
async parent() {
|
||||
await this.classify()
|
||||
if ( this.is_directory() ) return path.resolve(this.path, '..')
|
||||
return this.directory()
|
||||
}
|
||||
|
||||
name() {
|
||||
return path.basename(this.path)
|
||||
}
|
||||
|
||||
async classify() {
|
||||
const dir_result = await this._host.execute(`${this._directory_classify_command} ${this._path}`)
|
||||
if ( dir_result.exit_code === 0 ) {
|
||||
|
||||
5
app/classes/logical/error/CommandNotFoundError.js
Normal file
5
app/classes/logical/error/CommandNotFoundError.js
Normal file
@@ -0,0 +1,5 @@
|
||||
class CommandNotFoundError extends Error {
|
||||
|
||||
}
|
||||
|
||||
module.exports = exports = CommandNotFoundError
|
||||
Reference in New Issue
Block a user