Use SHFileOperationW for remove_all on Windows
This commit is contained in:
1 parent
a28392852a
commit
65fec9134e
3 files changed
+29
-57
No files matched your search
@@ -8,6 +8,18 @@ write_string :: proc(f: ^File, s: string) -> (n: int, err: Error) {
|
||||
return write(f, transmute([]byte)s)
|
||||
}
|
||||
|
||||
write_strings :: proc(f: ^File, strings: ..string) -> (n: int, err: Error) {
|
||||
for s in strings {
|
||||
m: int
|
||||
m, err = write_string(f, s)
|
||||
n += m
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
write_byte :: proc(f: ^File, b: byte) -> (n: int, err: Error) {
|
||||
return write(f, []byte{b})
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user