[os2]: Split file type from mode bits

This commit is contained in:
flysand7
2024-07-18 23:09:27 +11:00
parent 0bb4cc6ce5
commit 7b501b22bb
13 changed files with 137 additions and 120 deletions
+1 -1
View File
@@ -138,7 +138,7 @@ read_entire_file_from_file :: proc(f: ^File, allocator: runtime.Allocator) -> (d
}
@(require_results)
write_entire_file :: proc(name: string, data: []byte, perm: File_Mode, truncate := true) -> Error {
write_entire_file :: proc(name: string, data: []byte, perm: int, truncate := true) -> Error {
flags := O_WRONLY|O_CREATE
if truncate {
flags |= O_TRUNC