Add package path/filepath; Add os.stat for windows (TODO: unix)

This commit is contained in:
gingerBill
2020-09-25 20:20:53 +01:00
parent 6b634d5e46
commit 8cc5cd1494
13 changed files with 997 additions and 18 deletions
+27
View File
@@ -0,0 +1,27 @@
package os
import "core:time"
File_Info :: struct {
fullpath: string,
name: string,
size: i64,
mode: File_Mode,
is_dir: bool,
creation_time: time.Time,
modification_time: time.Time,
access_time: time.Time,
}
file_info_delete :: proc(fi: File_Info) {
delete(fi.fullpath);
}
File_Mode :: distinct u32;
File_Mode_Dir :: File_Mode(1<<16);
File_Mode_Named_Pipe :: File_Mode(1<<17);
File_Mode_Device :: File_Mode(1<<18);
File_Mode_Char_Device :: File_Mode(1<<19);
File_Mode_Sym_Link :: File_Mode(1<<20);