fixes #642
This commit is contained in:
parent
e1630dcc73
commit
81f013dabb
1 changed files with 5 additions and 1 deletions
|
|
@ -474,6 +474,10 @@ proc getCreationTime*(file: string): Time {.rtl, extern: "nos$1".} =
|
||||||
proc fileNewer*(a, b: string): bool {.rtl, extern: "nos$1".} =
|
proc fileNewer*(a, b: string): bool {.rtl, extern: "nos$1".} =
|
||||||
## Returns true if the file `a` is newer than file `b`, i.e. if `a`'s
|
## Returns true if the file `a` is newer than file `b`, i.e. if `a`'s
|
||||||
## modification time is later than `b`'s.
|
## modification time is later than `b`'s.
|
||||||
|
when defined(posix):
|
||||||
|
result = getLastModificationTime(a) - getLastModificationTime(b) >= 0
|
||||||
|
# Posix's resolution sucks so, we use '>=' for posix.
|
||||||
|
else:
|
||||||
result = getLastModificationTime(a) - getLastModificationTime(b) > 0
|
result = getLastModificationTime(a) - getLastModificationTime(b) > 0
|
||||||
|
|
||||||
proc getCurrentDir*(): string {.rtl, extern: "nos$1", tags: [].} =
|
proc getCurrentDir*(): string {.rtl, extern: "nos$1", tags: [].} =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue