mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-31 11:50:07 +00:00
Mockup of the new package os interface (incomplete and non-functioning)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package os2
|
||||
|
||||
Path_Separator :: _Path_Separator; // OS-Specific
|
||||
Path_List_Separator :: _Path_List_Separator; // OS-Specific
|
||||
|
||||
is_path_separator :: proc(c: byte) -> bool {
|
||||
return _is_path_separator(c);
|
||||
}
|
||||
|
||||
mkdir :: proc(name: string, perm: File_Mode) -> Maybe(Path_Error) {
|
||||
return _mkdir(name, perm);
|
||||
}
|
||||
|
||||
mkdir_all :: proc(path: string, perm: File_Mode) -> Maybe(Path_Error) {
|
||||
return _mkdir_all(path, perm);
|
||||
}
|
||||
|
||||
remove_all :: proc(path: string) -> Maybe(Path_Error) {
|
||||
return _remove_all(path);
|
||||
}
|
||||
|
||||
|
||||
|
||||
getwd :: proc(allocator := context.allocator) -> (dir: string, err: Error) {
|
||||
return _getwd(allocator);
|
||||
}
|
||||
setwd :: proc(dir: string) -> (err: Error) {
|
||||
return _setwd(dir);
|
||||
}
|
||||
Reference in New Issue
Block a user