mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
Begin mocking out the linux stuff on os2
This commit is contained in:
+12
-2
@@ -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
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user