summary refs log tree commit diff stats
path: root/lib/std/dirs.nim
diff options
context:
space:
mode:
authorAndrey Makarov <ph.makarov@gmail.com>2022-10-28 11:01:28 +0300
committerGitHub <noreply@github.com>2022-10-28 10:01:28 +0200
commit779b1cc5beefa6064cb640401f1969c95a96c205 (patch)
treef2f90b81d95cd8d1aa64236dd053cb34dab95ccc /lib/std/dirs.nim
parente68a6ea759c65ec2ec92cfe5ef922c5c3ef0623e (diff)
downloadNim-779b1cc5beefa6064cb640401f1969c95a96c205.tar.gz
Fix #20628 for Windows (#20667)
* Fix #20628 for Windows

* Move isRegular - !isSpecial and onlyRegular - skipSpecial

* Forgot to change it in 1 more place
Diffstat (limited to 'lib/std/dirs.nim')
-rw-r--r--lib/std/dirs.nim12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/std/dirs.nim b/lib/std/dirs.nim
index 7d72af1eb..adab9e9dd 100644
--- a/lib/std/dirs.nim
+++ b/lib/std/dirs.nim
@@ -69,7 +69,7 @@ proc moveDir*(source, dest: Path) {.inline, tags: [ReadIOEffect, WriteIOEffect].
   moveDir(source.string, dest.string)
 
 iterator walkDir*(dir: Path; relative = false, checkDir = false,
-                 onlyRegular = false):
+                 skipSpecial = false):
     tuple[kind: PathComponent, path: Path] {.tags: [ReadDirEffect].} =
   ## Walks over the directory `dir` and yields for each directory or file in
   ## `dir`. The component type and full path for each item are returned.
@@ -80,20 +80,20 @@ iterator walkDir*(dir: Path; relative = false, checkDir = false,
   ##   otherwise the full path is returned.
   ## * If `checkDir` is true, `OSError` is raised when `dir`
   ##   doesn't exist.
-  ## * If `onlyRegular` is true, then (besides all directories) only *regular*
+  ## * If `skipSpecial` is true, then (besides all directories) only *regular*
   ##   files (**without** special "file" objects like FIFOs, device files,
   ##   etc) will be yielded on Unix.
-  for (k, p) in walkDir(dir.string, relative, checkDir, onlyRegular):
+  for (k, p) in walkDir(dir.string, relative, checkDir, skipSpecial):
     yield (k, Path(p))
 
 iterator walkDirRec*(dir: Path,
                      yieldFilter = {pcFile}, followFilter = {pcDir},
-                     relative = false, checkDir = false, onlyRegular = false):
+                     relative = false, checkDir = false, skipSpecial = false):
                     Path {.tags: [ReadDirEffect].} =
   ## Recursively walks over the directory `dir` and yields for each file
   ## or directory in `dir`.
   ##
-  ## Options `relative`, `checkdir`, `onlyRegular` are explained in
+  ## Options `relative`, `checkdir`, `skipSpecial` are explained in
   ## [walkDir iterator] description.
   ##
   ## .. warning:: Modifying the directory structure while the iterator
@@ -121,7 +121,7 @@ iterator walkDirRec*(dir: Path,
   ## See also:
   ## * `walkDir iterator`_
   for p in walkDirRec(dir.string, yieldFilter, followFilter, relative,
-                      checkDir, onlyRegular):
+                      checkDir, skipSpecial):
     yield Path(p)
 
 proc setCurrentDir*(newDir: Path) {.inline, tags: [].} =