mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Add utility calls to os2
This commit is contained in:
@@ -54,3 +54,21 @@ stat_do_not_follow_links :: proc(name: string, allocator: runtime.Allocator) ->
|
||||
same_file :: proc(fi1, fi2: File_Info) -> bool {
|
||||
return _same_file(fi1, fi2)
|
||||
}
|
||||
|
||||
|
||||
last_write_time :: modification_time
|
||||
last_write_time_by_name :: modification_time_by_name
|
||||
|
||||
@(require_results)
|
||||
modification_time :: proc(f: ^File) -> (time.Time, Error) {
|
||||
TEMP_ALLOCATOR_GUARD()
|
||||
fi, err := fstat(f, temp_allocator())
|
||||
return fi.modification_time, err
|
||||
}
|
||||
|
||||
@(require_results)
|
||||
modification_time_by_name :: proc(path: string) -> (time.Time, Error) {
|
||||
TEMP_ALLOCATOR_GUARD()
|
||||
fi, err := stat(path, temp_allocator())
|
||||
return fi.modification_time, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user