mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 08:08:50 +00:00
Use fstat on os2.File directly
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user