Add os.stat, os.lstat, os.fstat, filepath.walk

This commit is contained in:
gingerBill
2020-09-28 12:28:02 +01:00
parent 2ebb94fa72
commit 9ae3879956
6 changed files with 170 additions and 32 deletions
+9 -2
View File
@@ -14,8 +14,15 @@ File_Info :: struct {
access_time: time.Time,
}
file_info_delete :: proc(fi: File_Info) {
delete(fi.fullpath);
file_info_slice_delete :: proc(infos: []File_Info, allocator := context.allocator) {
for i := len(infos)-1; i >= 0; i -= 1 {
file_info_delete(infos[i], allocator);
}
delete(infos, allocator);
}
file_info_delete :: proc(fi: File_Info, allocator := context.allocator) {
delete(fi.fullpath, allocator);
}
File_Mode :: distinct u32;