diff options
Diffstat (limited to 'src/stdlib/paths.c')
| -rw-r--r-- | src/stdlib/paths.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/stdlib/paths.c b/src/stdlib/paths.c index c7b560b9..05575620 100644 --- a/src/stdlib/paths.c +++ b/src/stdlib/paths.c @@ -255,28 +255,28 @@ public bool Path$can_execute(Path_t path) #endif } -public OptionalMoment_t Path$modified(Path_t path, bool follow_symlinks) +public OptionalInt64_t Path$modified(Path_t path, bool follow_symlinks) { struct stat sb; int status = path_stat(path, follow_symlinks, &sb); - if (status != 0) return NONE_MOMENT; - return (Moment_t){.tv_sec=sb.st_mtime}; + if (status != 0) return NONE_INT64; + return (OptionalInt64_t){.value=(int64_t)sb.st_mtime}; } -public OptionalMoment_t Path$accessed(Path_t path, bool follow_symlinks) +public OptionalInt64_t Path$accessed(Path_t path, bool follow_symlinks) { struct stat sb; int status = path_stat(path, follow_symlinks, &sb); - if (status != 0) return NONE_MOMENT; - return (Moment_t){.tv_sec=sb.st_atime}; + if (status != 0) return NONE_INT64; + return (OptionalInt64_t){.value=(int64_t)sb.st_atime}; } -public OptionalMoment_t Path$changed(Path_t path, bool follow_symlinks) +public OptionalInt64_t Path$changed(Path_t path, bool follow_symlinks) { struct stat sb; int status = path_stat(path, follow_symlinks, &sb); - if (status != 0) return NONE_MOMENT; - return (Moment_t){.tv_sec=sb.st_ctime}; + if (status != 0) return NONE_INT64; + return (OptionalInt64_t){.value=(int64_t)sb.st_ctime}; } static void _write(Path_t path, Array_t bytes, int mode, int permissions) |
