(shellServer: ShellServer, location: string)
| 572 | } |
| 573 | |
| 574 | async function createFile(shellServer: ShellServer, location: string) { |
| 575 | try { |
| 576 | await shellServer.exec(createFileCommand(location)); |
| 577 | return true; |
| 578 | } catch (err) { |
| 579 | return false; |
| 580 | } |
| 581 | } |
| 582 | |
| 583 | export function createFileCommand(location: string) { |
| 584 | return `test ! -f '${location}' && set -o noclobber && mkdir -p '${path.posix.dirname(location)}' && { > '${location}' ; } 2> /dev/null`; |
no test coverage detected