Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d18593 commit a68bfe2Copy full SHA for a68bfe2
1 file changed
Lib/macpath.py
@@ -131,3 +131,22 @@ def exists(s):
131
132
def normpath(s):
133
return s
134
+
135
+# Directory tree walk.
136
+# For each directory under top (including top itself),
137
+# func(arg, dirname, filenames) is called, where
138
+# dirname is the name of the directory and filenames is the list
139
+# of files (and subdirectories etc.) in the directory.
140
+# The func may modify the filenames list, to implement a filter,
141
+# or to impose a different order of visiting.
142
143
+def walk(top, func, arg):
144
+ try:
145
+ names = mac.listdir(top)
146
+ except mac.error:
147
+ return
148
+ func(arg, top, names)
149
+ for name in names:
150
+ name = join(top, name)
151
+ if isdir(name):
152
+ walk(name, func, arg)
0 commit comments