clarify the docs of existsOrCreateDir a bit (#17182)
* remove unnecessary when statement * remove outdated codes * clarify the docs a bit
This commit is contained in:
parent
dcd3f26876
commit
f07bdbe945
1 changed files with 3 additions and 4 deletions
|
|
@ -2436,11 +2436,10 @@ proc rawCreateDir(dir: string): bool {.noWeirdTarget.} =
|
||||||
|
|
||||||
proc existsOrCreateDir*(dir: string): bool {.rtl, extern: "nos$1",
|
proc existsOrCreateDir*(dir: string): bool {.rtl, extern: "nos$1",
|
||||||
tags: [WriteDirEffect, ReadDirEffect], noWeirdTarget.} =
|
tags: [WriteDirEffect, ReadDirEffect], noWeirdTarget.} =
|
||||||
## Check if a `directory`:idx: `dir` exists, and create it otherwise.
|
## Checks if a `directory`:idx: `dir` exists, and creates it otherwise.
|
||||||
##
|
##
|
||||||
## Does not create parent directories (fails if parent does not exist).
|
## Does not create parent directories (raises `OSError` if parent directories do not exist).
|
||||||
## Returns `true` if the directory already exists, and `false`
|
## Returns `true` if the directory already exists, and `false` otherwise.
|
||||||
## otherwise.
|
|
||||||
##
|
##
|
||||||
## See also:
|
## See also:
|
||||||
## * `removeDir proc <#removeDir,string>`_
|
## * `removeDir proc <#removeDir,string>`_
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue