mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 16:18:52 +00:00
Use SHFileOperationW for remove_all on Windows
This commit is contained in:
@@ -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