Make os2.File a more generic interface

This commit is contained in:
gingerBill
2024-07-14 15:09:33 +01:00
parent 3d38f14202
commit 4f73b35da5
5 changed files with 103 additions and 74 deletions
+2 -1
View File
@@ -7,7 +7,8 @@ import "core:sys/linux"
import "core:path/filepath"
_fstat :: proc(f: ^File, allocator: runtime.Allocator) -> (File_Info, Error) {
return _fstat_internal(f.impl.fd, allocator)
impl := (^_File)(f.impl)
return _fstat_internal(impl.fd, allocator)
}
_fstat_internal :: proc(fd: linux.Fd, allocator: runtime.Allocator) -> (File_Info, Error) {