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

@ -251,12 +251,12 @@ proc walkDirRecursively(s: var seq[string], root, explicit: string,
proc addFiles(s: var seq[string], patterns: seq[string]) =
for p in items(patterns):
if existsDir(p):
if dirExists(p):
walkDirRecursively(s, p, p, false)
else:
var i = 0
for f in walkPattern(p):
if existsDir(f):
if dirExists(f):
walkDirRecursively(s, f, p, false)
elif not ignoreFile(f, p, false):
add(s, unixToNativePath(f))
@ -518,7 +518,7 @@ template gatherFiles(fun, libpath, outDir) =
proc srcdist(c: var ConfigData) =
let cCodeDir = getOutputDir(c) / "c_code"
if not existsDir(cCodeDir): createDir(cCodeDir)
if not dirExists(cCodeDir): createDir(cCodeDir)
gatherFiles(copyFile, c.libpath, cCodeDir)
var winIndex = -1
var intel32Index = -1
@ -532,7 +532,7 @@ proc srcdist(c: var ConfigData) =
if cpuname.cmpIgnoreStyle("i386") == 0: intel32Index = cpuA
elif cpuname.cmpIgnoreStyle("amd64") == 0: intel64Index = cpuA
var dir = getOutputDir(c) / buildDir(osA, cpuA)
if existsDir(dir): removeDir(dir)
if dirExists(dir): removeDir(dir)
createDir(dir)
var cmd = ("nim compile -f --symbolfiles:off --compileonly " &
"--gen_mapping --cc:gcc --skipUserCfg" &