Use fstat on os2.File directly

This commit is contained in:
gingerBill
2024-07-14 14:51:22 +01:00
parent d1450e3d88
commit 3d38f14202
5 changed files with 19 additions and 19 deletions
+5 -3
View File
@@ -29,10 +29,12 @@ file_info_delete :: proc(fi: File_Info, allocator: runtime.Allocator) {
@(require_results)
fstat :: proc(f: ^File, allocator: runtime.Allocator) -> (File_Info, Error) {
if f != nil && f.user_fstat != nil {
return f->user_fstat(allocator)
if f == nil {
return {}, nil
} else if f.fstat != nil {
return f->fstat(allocator)
}
return _fstat(f, allocator)
return {}, .Invalid_Callback
}
@(require_results)