explicit effects for existsOrCreateDir

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

View file

@ -925,7 +925,8 @@ proc rawCreateDir(dir: string): bool =
else: else:
raiseOSError(osLastError()) 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. ## Check if a `directory`:idx: `dir` exists, and create it otherwise.
## ##
## Does not create parent directories (fails if parent does not exist). ## Does not create parent directories (fails if parent does not exist).