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

@ -446,7 +446,7 @@ ingameClient.registerHandler(KeyF12, down, proc() = toggleSpec())
ingameClient.registerHandler(KeyF11, down, toggleShipSelect)
ingameClient.registerHandler(MouseLeft, down, handleLClick)
when defined(recordMode):
if not existsDir("data/snapshots"):
if not dirExists("data/snapshots"):
createDir("data/snapshots")
ingameClient.registerHandler(keynum9, down, proc() =
if not isRecording: startRecording()

View file

@ -103,7 +103,7 @@ proc saveCurrentFile() =
let
path = expandPath(currentFileTransfer.assetType, currentFileTransfer.fileName)
parent = parentDir(path)
if not existsDir(parent):
if not dirExists(parent):
createDir(parent)
echo("Created dir")
writeFile path, currentFIleTransfer.data

View file

@ -77,7 +77,7 @@ task "testskel", "create skeleton test dir for testing":
task "clean", "cleanup generated files":
var dirs = @["nimcache", "server"/"nimcache"]
dirs.apply(proc(x: var string) =
if existsDir(x): removeDir(x))
if dirExists(x): removeDir(x))
task "download", "download game assets":
var