Begin mocking out the linux stuff on os2

This commit is contained in:
gingerBill
2024-07-23 16:06:14 +01:00
parent 61b9a5dbb2
commit 24f9e2bbeb
6 changed files with 126 additions and 68 deletions
+12 -2
View File
@@ -267,14 +267,24 @@ exists :: proc(path: string) -> bool {
@(require_results)
is_file :: proc(path: string) -> bool {
return _is_file(path)
TEMP_ALLOCATOR_GUARD()
fi, err := stat(path, temp_allocator())
if err != nil {
return false
}
return fi.type == .Regular
}
is_dir :: is_directory
@(require_results)
is_directory :: proc(path: string) -> bool {
return _is_dir(path)
TEMP_ALLOCATOR_GUARD()
fi, err := stat(path, temp_allocator())
if err != nil {
return false
}
return fi.type == .Directory
}