Store clean_path, also add to reader API

This commit is contained in:
Riyyi
2026-08-17 16:56:48 +02:00
parent 9a4e61626c
commit 9a8ba59d68
4 changed files with 32 additions and 11 deletions
+4
View File
@@ -1,11 +1,13 @@
package file
import "base:runtime"
import "core:fmt"
import "core:os"
// -----------------------------------------
Error :: union #shared_nil {
runtime.Allocator_Error,
os.Error,
File_Error,
}
@@ -42,6 +44,8 @@ format_error :: proc(ferr: Error) -> string {
switch e in ferr {
case nil:
return ""
case runtime.Allocator_Error:
return fmt.tprintf("allocator: {}", e)
case os.Error:
return fmt.tprintf("os: {}", e)
case File_Error: