summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBillingsly Wetherfordshire <phowl.mouth@gmail.com>2013-12-23 12:58:22 -0600
committerBillingsly Wetherfordshire <phowl.mouth@gmail.com>2013-12-23 12:58:22 -0600
commite1fa19fa7a69bf5c0d182f0183820d37f8d5955b (patch)
tree4cae53133558549a635a9683d464642a7d60c166
parentc3b3339e779dfe19ed1891295a763aea47981131 (diff)
downloadNim-e1fa19fa7a69bf5c0d182f0183820d37f8d5955b.tar.gz
Update os.nim
added file/dirExists synonyms for existsFile/dir
-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):