{.deprecated: [existsFile: fileExists].} (#14735)

* {.deprecated: [existsFile: fileExists].}

* s/existsFile/fileExists/ except under deps

* workaround pending #14819

* fix test
This commit is contained in:
Timothee Cour 2020-07-02 07:19:13 -07:00 • committed by GitHub
commit dc5a40f3f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 66 additions and 67 deletions

View file

@ -127,7 +127,7 @@ proc handleFileChallenge*(serv: PServer; buffer: PBuffer) =
challenge = readScFileChallenge(buffer)
path = expandPath(challenge)
resp: CsFileChallenge
if not existsFile(path):
if not fileExists(path):
resp.needFile = true
echo "Got file challenge, need file."
else:

View file

@ -221,7 +221,7 @@ template cacheImpl(procName, cacheName, resultType, body: untyped) {.dirty.} =
cacheName[filename] = result
template checkFile(path: untyped) {.dirty.} =
if not existsFile(path):
if not fileExists(path):
errors.add("File missing: " & path)
cacheImpl newSprite, SpriteSheets, PSpriteSheet:
@ -322,7 +322,7 @@ proc validateSettings*(settings: JsonNode, errors: var seq[string]): bool =
inc id
proc loadSettingsFromFile*(filename: string, errors: var seq[string]): bool =
if not existsFile(filename):
if not fileExists(filename):
errors.add("File does not exist: "&filename)
else:
result = loadSettings(readFile(filename), errors)