summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2014-01-13 14:39:40 -0800
committerAndreas Rumpf <rumpf_a@web.de>2014-01-13 14:39:40 -0800
commit3f8bfb1e988322ab60cc54184d63a00906260665 (patch)
treeaaa4f901cf084778beb5b227dc2e531b3670a44b /lib/pure
parent90721375e2e92763c24193960b686d143aa2b091 (diff)
parente1fa19fa7a69bf5c0d182f0183820d37f8d5955b (diff)
downloadNim-3f8bfb1e988322ab60cc54184d63a00906260665.tar.gz
Merge pull request #777 from fowlmouth/patch-4
Update os.nim
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/os.nim8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/pure/os.nim b/lib/pure/os.nim
index d74cb1fb9..7a8722ab4 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):