From e1fa19fa7a69bf5c0d182f0183820d37f8d5955b Mon Sep 17 00:00:00 2001 From: Billingsly Wetherfordshire Date: Mon, 23 Dec 2013 12:58:22 -0600 Subject: [PATCH] Update os.nim added file/dirExists synonyms for existsFile/dir --- lib/pure/os.nim | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/pure/os.nim b/lib/pure/os.nim index d74cb1fb94..7a8722ab45 100644 --- a/lib/pure/os.nim +++ b/lib/pure/os.nim @@ -398,6 +398,14 @@ proc existsDir*(dir: string): bool {.rtl, extern: "nos$1", tags: [FReadDir].} = var res: TStat return stat(dir, res) >= 0'i32 and S_ISDIR(res.st_mode) +proc fileExists*(filename: string): bool {.inline.} = + ## Synonym for existsFile + existsFile(filename) + +proc dirExists*(dir: string): bool {.inline.} = + ## Synonym for existsDir + existsDir(dir) + proc getLastModificationTime*(file: string): TTime {.rtl, extern: "nos$1".} = ## Returns the `file`'s last modification time. when defined(posix):