diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-11-17 14:49:03 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-11-17 14:49:03 -0500 |
| commit | 4231789b71bb42c4ab04e125f98fe5eb3cf030b6 (patch) | |
| tree | c73aafaeef60b77555cfd25ccd30c618e431d52a /stdlib/paths.c | |
| parent | c1ae79ac3c320923363994fb88f4cc2fa13317ce (diff) | |
Rename datetime -> moment
Diffstat (limited to 'stdlib/paths.c')
| -rw-r--r-- | stdlib/paths.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/stdlib/paths.c b/stdlib/paths.c index 6e138b57..56492718 100644 --- a/stdlib/paths.c +++ b/stdlib/paths.c @@ -205,28 +205,28 @@ public bool Path$is_symlink(Path_t path) return (sb.st_mode & S_IFMT) == S_IFLNK; } -public OptionalDateTime_t Path$modified(Path_t path, bool follow_symlinks) +public OptionalMoment_t Path$modified(Path_t path, bool follow_symlinks) { struct stat sb; int status = path_stat(path, follow_symlinks, &sb); - if (status != 0) return NULL_DATETIME; - return (DateTime_t){.tv_sec=sb.st_mtime}; + if (status != 0) return NULL_MOMENT; + return (Moment_t){.tv_sec=sb.st_mtime}; } -public OptionalDateTime_t Path$accessed(Path_t path, bool follow_symlinks) +public OptionalMoment_t Path$accessed(Path_t path, bool follow_symlinks) { struct stat sb; int status = path_stat(path, follow_symlinks, &sb); - if (status != 0) return NULL_DATETIME; - return (DateTime_t){.tv_sec=sb.st_atime}; + if (status != 0) return NULL_MOMENT; + return (Moment_t){.tv_sec=sb.st_atime}; } -public OptionalDateTime_t Path$changed(Path_t path, bool follow_symlinks) +public OptionalMoment_t Path$changed(Path_t path, bool follow_symlinks) { struct stat sb; int status = path_stat(path, follow_symlinks, &sb); - if (status != 0) return NULL_DATETIME; - return (DateTime_t){.tv_sec=sb.st_ctime}; + if (status != 0) return NULL_MOMENT; + return (Moment_t){.tv_sec=sb.st_ctime}; } static void _write(Path_t path, Array_t bytes, int mode, int permissions) |
