mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
remove unzip
This commit is contained in:
parent
08e9cb60d0
commit
9b1514320a
17
os/os.v
17
os/os.v
@ -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));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user