Decouple usage of filepath from os2

This commit is contained in:
Feoramund
2025-03-21 19:14:15 -04:00
parent abe0c30837
commit 4e7f54c565
12 changed files with 42 additions and 39 deletions
+1 -2
View File
@@ -4,7 +4,6 @@ package os2
import "core:time"
import "base:runtime"
import "core:sys/linux"
import "core:path/filepath"
_fstat :: proc(f: ^File, allocator: runtime.Allocator) -> (File_Info, Error) {
impl := (^File_Impl)(f.impl)
@@ -42,7 +41,7 @@ _fstat_internal :: proc(fd: linux.Fd, allocator: runtime.Allocator) -> (fi: File
creation_time = time.Time{i64(s.ctime.time_sec) * i64(time.Second) + i64(s.ctime.time_nsec)}, // regular stat does not provide this
}
fi.creation_time = fi.modification_time
fi.name = filepath.base(fi.fullpath)
_, fi.name = split_path(fi.fullpath)
return
}