mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
os/os2: add default permissions to write_entire_file
This commit is contained in:
@@ -164,7 +164,7 @@ read_entire_file_from_file :: proc(f: ^File, allocator: runtime.Allocator) -> (d
|
|||||||
}
|
}
|
||||||
|
|
||||||
@(require_results)
|
@(require_results)
|
||||||
write_entire_file :: proc(name: string, data: []byte, perm: int, truncate := true) -> Error {
|
write_entire_file :: proc(name: string, data: []byte, perm: int = 0o644, truncate := true) -> Error {
|
||||||
flags := O_WRONLY|O_CREATE
|
flags := O_WRONLY|O_CREATE
|
||||||
if truncate {
|
if truncate {
|
||||||
flags |= O_TRUNC
|
flags |= O_TRUNC
|
||||||
|
|||||||
Reference in New Issue
Block a user