File tree Expand file tree Collapse file tree 2 files changed +5
-27
lines changed
Expand file tree Collapse file tree 2 files changed +5
-27
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,7 @@ echo f
135135- ` parseutils.parseUntil ` has now a different behaviour if the ` until ` parameter is
136136 empty. This was required for intuitive behaviour of the strscans module
137137 (see bug #13605 ).
138+ - ` std/oswalkdir ` was buggy, it's now deprecated and reuses ` std/os ` procs
138139
139140
140141## Language additions
Original file line number Diff line number Diff line change 77# distribution, for details about the copyright.
88#
99
10- # # Compile-time only version for walkDir if you need it at compile-time
11- # # for JavaScript.
12-
13- type
14- PathComponent * = enum # # Enumeration specifying a path component.
15- pcFile, # # path refers to a file
16- pcLinkToFile, # # path refers to a symbolic link to a file
17- pcDir, # # path refers to a directory
18- pcLinkToDir # # path refers to a symbolic link to a directory
19-
20- proc staticWalkDir (dir: string ; relative: bool ): seq [
21- tuple [kind: PathComponent ; path: string ]] =
22- discard
23-
24- iterator walkDir * (dir: string ; relative = false ): tuple [kind: PathComponent ;
25- path: string ] =
26- for k, v in items (staticWalkDir (dir, relative)):
27- yield (k, v)
28-
29- iterator walkDirRec * (dir: string ; filter = {pcFile, pcDir}): string =
30- var stack = @ [dir]
31- while stack.len > 0 :
32- for k, p in walkDir (stack.pop ()):
33- if k in filter:
34- case k
35- of pcFile, pcLinkToFile: yield p
36- of pcDir, pcLinkToDir: stack.add (p)
10+ # # This module is deprecated, ``import os`` instead.
11+ {.deprecated : " import os.nim instead" .}
12+ import os
13+ export PathComponent , walkDir, walkDirRec
You can’t perform that action at this time.
0 commit comments