deprecate existsDir; use dirExists instead (#14884)

This commit is contained in:
Timothee Cour 2020-07-03 14:04:23 -07:00 • committed by GitHub
commit 695154970d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 32 additions and 39 deletions

View file

@ -131,18 +131,17 @@ proc fileExists*(filename: string): bool {.tags: [ReadIOEffect].} =
## Checks if the file exists.
builtin
template existsFile*(args: varargs[untyped]): untyped {.deprecated: "use fileExists".} =
# xxx: warning won't be shown for nimsscript because of current logic handling
# `foreignPackageNotes`
fileExists(args)
proc dirExists*(dir: string): bool {.
tags: [ReadIOEffect].} =
## Checks if the directory `dir` exists.
builtin
proc existsDir*(dir: string): bool =
## An alias for ``dirExists``.
template existsFile*(args: varargs[untyped]): untyped {.deprecated: "use fileExists".} =
# xxx: warning won't be shown for nimsscript because of current logic handling
# `foreignPackageNotes`
fileExists(args)
template existsDir*(args: varargs[untyped]): untyped {.deprecated: "use dirExists".} =
dirExists(dir)
proc selfExe*(): string =