Skip to content

Commit f3e9daa

Browse files
kthelgasonrvagg
authored andcommitted
doc: add clarification on birthtime in fs stat
Clarifies the possibility of birthtime in the fs stat object being greater than atime or mtime when not available in the filesystem (see issue for further info). Fixes: #2222 PR-URL: #5479 Reviewed-By: James M Snell <[email protected]>
1 parent c379ec6 commit f3e9daa

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

doc/api/fs.markdown

+5-4
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,11 @@ The times in the stat object have the following semantics:
190190
* `birthtime` "Birth Time" - Time of file creation. Set once when the
191191
file is created. On filesystems where birthtime is not available,
192192
this field may instead hold either the `ctime` or
193-
`1970-01-01T00:00Z` (ie, unix epoch timestamp `0`). On Darwin and
194-
other FreeBSD variants, also set if the `atime` is explicitly set to
195-
an earlier value than the current `birthtime` using the `utimes(2)`
196-
system call.
193+
`1970-01-01T00:00Z` (ie, unix epoch timestamp `0`). Note that this
194+
value may be greater than `atime` or `mtime` in this case. On Darwin
195+
and other FreeBSD variants, also set if the `atime` is explicitly
196+
set to an earlier value than the current `birthtime` using the
197+
`utimes(2)` system call.
197198

198199
Prior to Node v0.12, the `ctime` held the `birthtime` on Windows
199200
systems. Note that as of v0.12, `ctime` is not "creation time", and

0 commit comments

Comments
 (0)