MCPcopy Index your code
hub / github.com/RustPython/RustPython / walk

Method walk

Lib/pathlib/__init__.py:882–892  ·  view source on GitHub ↗

Walk the directory tree from this directory, similar to os.walk().

(self, top_down=True, on_error=None, follow_symlinks=False)

Source from the content-addressed store, hash-verified

880 return self.glob(pattern, case_sensitive=case_sensitive, recurse_symlinks=recurse_symlinks)
881
882 def walk(self, top_down=True, on_error=None, follow_symlinks=False):
883 """Walk the directory tree from this directory, similar to os.walk()."""
884 sys.audit("pathlib.Path.walk", self, on_error, follow_symlinks)
885 root_dir = str(self)
886 if not follow_symlinks:
887 follow_symlinks = os._walk_symlinks_as_files
888 results = os.walk(root_dir, top_down, on_error, follow_symlinks)
889 for path_str, dirnames, filenames in results:
890 if root_dir == '.':
891 path_str = path_str[2:]
892 yield self._from_parsed_string(path_str), dirnames, filenames
893
894 def absolute(self):
895 """Return an absolute version of this path

Callers 15

_rmtree_unsafeFunction · 0.45
_make_zipfileFunction · 0.45
remove_folderMethod · 0.45
walkFunction · 0.45
body_line_iteratorFunction · 0.45
typed_subpart_iteratorFunction · 0.45
get_charsetsMethod · 0.45
_dispatchMethod · 0.45
available_timezonesFunction · 0.45
addScreenshotsMethod · 0.45
mainFunction · 0.45
iterate_filesFunction · 0.45

Calls 2

strFunction · 0.85
_from_parsed_stringMethod · 0.80

Tested by 2

addScreenshotsMethod · 0.36
_parse_methodMethod · 0.36