deprecate existsDir; use dirExists instead (#14884)
This commit is contained in:
parent
4f6acf24ff
commit
695154970d
14 changed files with 32 additions and 39 deletions
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ assert fileExists("tests/newconfig/tfoo.nims") == true
|
|||
assert dirExists("tests") == true
|
||||
|
||||
assert fileExists("tests/newconfig/tfoo.nims") == true
|
||||
assert existsDir("tests") == true
|
||||
assert dirExists("tests") == true
|
||||
|
||||
discard selfExe()
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,6 @@ block:
|
|||
doAssert "./foo//./bar/".normalizedPath == "foo/bar".unixToNativePath
|
||||
|
||||
block: # #14142
|
||||
discard existsDir("/usr")
|
||||
discard dirExists("/usr")
|
||||
discard fileExists("/usr/foo")
|
||||
discard findExe("nim")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue