deprecate existsDir; use dirExists instead (#14884)
This commit is contained in:
parent
4f6acf24ff
commit
695154970d
14 changed files with 32 additions and 39 deletions
|
|
@ -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" &
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue