Use SHFileOperationW for remove_all on Windows

This commit is contained in:
gingerBill
2024-07-23 17:30:42 +01:00
parent a28392852a
commit 65fec9134e
3 changed files with 29 additions and 57 deletions
+12
View File
@@ -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})
}