Skip to content

Commit 1afab6a

Browse files
kthelgasonMyles Borins
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 <jasnell@gmail.com>
1 parent d871ae2 commit 1afab6a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

doc/api/fs.markdown

Lines changed: 5 additions & 4 deletions
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)