MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / walk

Method walk

tools/mkromfs.py:85–99  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

83 return bn
84
85 def walk(self):
86 # os.listdir will return unicode list if the argument is unicode.
87 # TODO: take care of the unicode names
88 for ent in os.listdir(u'.'):
89 if os.path.isdir(ent):
90 cwd = os.getcwd()
91 d = Folder(ent)
92 # depth-first
93 os.chdir(os.path.join(cwd, ent))
94 d.walk()
95 # restore the cwd
96 os.chdir(cwd)
97 self._children.append(d)
98 else:
99 self._children.append(File(ent))
100
101 def sort(self):
102 def _sort(x, y):

Callers 15

GetAttachConfigFunction · 0.80
_get_header_dirFunction · 0.80
find_rtl_extFunction · 0.80
find_filesFunction · 0.80
walk_kconfigFunction · 0.80
zip_distFunction · 0.80
MkDist_StripFunction · 0.80
mkromfs.pyFile · 0.80
list_filesFunction · 0.80
stm32update_main2entryFunction · 0.80
stm32update_heap2zeroFunction · 0.80
find_filesMethod · 0.80

Calls 3

FolderClass · 0.85
FileClass · 0.85
joinMethod · 0.45

Tested by

no test coverage detected