diff options
author | Ćukasz Czerniawski <33061335+lczerniawski@users.noreply.github.com> | 2024-11-13 05:35:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-13 13:35:04 +0900 |
commit | 7becd83a3828b35331d0fcb82c64146e520f154b (patch) | |
tree | edab8904c24802a3163427d8df9b41aa3cc4c3d1 /ext/fs/ops.rs | |
parent | 43812ee8ff0eb2584c7beb18639da14d96d06817 (diff) |
feat(ext/fs): add ctime to Deno.stats and use it in node compat layer (#24801)
This PR fixes #24453, by introducing a ctime (using ctime for UNIX and
ChangeTime for Windows) to Deno.stats.
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
Diffstat (limited to 'ext/fs/ops.rs')
-rw-r--r-- | ext/fs/ops.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/fs/ops.rs b/ext/fs/ops.rs index 9b76b49e6..3d0d96ce6 100644 --- a/ext/fs/ops.rs +++ b/ext/fs/ops.rs @@ -1795,6 +1795,8 @@ create_struct_writer! { atime: u64, birthtime_set: bool, birthtime: u64, + ctime_set: bool, + ctime: u64, // Following are only valid under Unix. dev: u64, ino: u64, @@ -1826,6 +1828,8 @@ impl From<FsStat> for SerializableStat { atime: stat.atime.unwrap_or(0), birthtime_set: stat.birthtime.is_some(), birthtime: stat.birthtime.unwrap_or(0), + ctime_set: stat.ctime.is_some(), + ctime: stat.ctime.unwrap_or(0), dev: stat.dev, ino: stat.ino, |