(filename: string | undefined | Promise<string | undefined>)
| 14 | } |
| 15 | |
| 16 | static async isExecutable(filename: string | undefined | Promise<string | undefined>): Promise<string> { |
| 17 | const { fullPath, isFile, isExecutable } = await filepath.info(filename) || fail(new Error(`Path ${filename} does not exist`)); |
| 18 | ok(isFile, new Error(`Path ${filename} is not a file`)); |
| 19 | ok(isExecutable, new Error(`File ${filename} is not executable`)); |
| 20 | return fullPath; |
| 21 | } |
| 22 | |
| 23 | static isAbsolute(path: string) { |
| 24 | ok(isAbsolutePath(path), `Path ${path} is not an absolute path`); |