Skip to content
This repository has been archived by the owner on May 31, 2019. It is now read-only.

Commit

Permalink
doc: add clarification on birthtime in fs stat
Browse files Browse the repository at this point in the history
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: nodejs/node#2222
PR-URL: nodejs/node#5479
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
kthelgason authored and claudiorodriguez committed Mar 14, 2016
1 parent 5d21496 commit 995a33b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions doc/api/fs.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,11 @@ The times in the stat object have the following semantics:
* `birthtime` "Birth Time" - Time of file creation. Set once when the
file is created. On filesystems where birthtime is not available,
this field may instead hold either the `ctime` or
`1970-01-01T00:00Z` (ie, unix epoch timestamp `0`). On Darwin and
other FreeBSD variants, also set if the `atime` is explicitly set to
an earlier value than the current `birthtime` using the `utimes(2)`
system call.
`1970-01-01T00:00Z` (ie, unix epoch timestamp `0`). Note that this
value may be greater than `atime` or `mtime` in this case. On Darwin
and other FreeBSD variants, also set if the `atime` is explicitly
set to an earlier value than the current `birthtime` using the
`utimes(2)` system call.

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

0 comments on commit 995a33b

Please sign in to comment.