[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
+6 -3
View File
@@ -12,12 +12,14 @@ is_path_separator :: proc(c: byte) -> bool {
}
mkdir :: make_directory
make_directory :: proc(name: string, perm: File_Mode) -> Error {
make_directory :: proc(name: string, perm: int) -> Error {
return _mkdir(name, perm)
}
mkdir_all :: make_directory_all
make_directory_all :: proc(path: string, perm: File_Mode) -> Error {
make_directory_all :: proc(path: string, perm: int) -> Error {
return _mkdir_all(path, perm)
}
@@ -25,14 +27,15 @@ remove_all :: proc(path: string) -> Error {
return _remove_all(path)
}
getwd :: get_working_directory
@(require_results)
get_working_directory :: proc(allocator: runtime.Allocator) -> (dir: string, err: Error) {
return _getwd(allocator)
}
setwd :: set_working_directory
set_working_directory :: proc(dir: string) -> (err: Error) {
return _setwd(dir)
}