remove unzip

pull/452/head
Alexander Medvednikov 2019-06-23 14:16:47 +02:00
parent 08e9cb60d0
commit 9b1514320a
1 changed files with 0 additions and 17 deletions

17
os/os.v
View File

@ -367,23 +367,6 @@ fn rmdir(path string, guard string) {
} }
*/ */
pub fn unzip(path, out string) {
$if windows {
// TODO native string
// TODO handle older Windows
// The only way to unzip a file without installing dependencies is to use PowerShell + .NET
# char *s="powershell.exe -nologo -noprofile -command \"& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('PATH', 'OUT'); }\" ";
mut cmd := ''
# cmd = tos(s, strlen(s));
cmd = cmd.replace('PATH', path)
cmd = cmd.replace('OUT', out)
os.system(cmd)
}
$else {
os.system('unzip -o -d "$out" "$path"')
}
}
fn print_c_errno() { fn print_c_errno() {
# printf("errno=%d err='%s'\n", errno, strerror(errno)); # printf("errno=%d err='%s'\n", errno, strerror(errno));
} }