explicit effects for existsOrCreateDir

This commit is contained in:
Andreas Rumpf
2018-04-14 13:57:27 +02:00
parent c6f15c53f4
commit 7c879d9b0f

View File

@@ -925,7 +925,8 @@ proc rawCreateDir(dir: string): bool =
else:
raiseOSError(osLastError())
proc existsOrCreateDir*(dir: string): bool =
proc existsOrCreateDir*(dir: string): bool {.rtl, extern: "nos$1",
tags: [WriteDirEffect, ReadDirEffect].} =
## Check if a `directory`:idx: `dir` exists, and create it otherwise.
##
## Does not create parent directories (fails if parent does not exist).