mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-01 02:42:05 +00:00
Better docs for os.getCreationTime(). Fixes #1058.
This commit is contained in:
@@ -461,8 +461,10 @@ proc getLastAccessTime*(file: string): Time {.rtl, extern: "nos$1".} =
|
||||
|
||||
proc getCreationTime*(file: string): Time {.rtl, extern: "nos$1".} =
|
||||
## Returns the `file`'s creation time.
|
||||
## Note that under posix OS's, the returned time may actually be the time at
|
||||
## which the file's attribute's were last modified.
|
||||
##
|
||||
## **Note:** Under POSIX OS's, the returned time may actually be the time at
|
||||
## which the file's attribute's were last modified. See
|
||||
## `here <https://github.com/nim-lang/Nim/issues/1058>`_ for details.
|
||||
when defined(posix):
|
||||
var res: Stat
|
||||
if stat(file, res) < 0'i32: raiseOSError(osLastError())
|
||||
|
||||
Reference in New Issue
Block a user