MCPcopy
hub / github.com/RUB-NDS/PRET / dirlist

Method dirlist

postscript.py:163–171  ·  view source on GitHub ↗
(self, path="", r=True)

Source from the content-addressed store, hash-verified

161 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
162 # get complete list of files and directories on remote device
163 def dirlist(self, path="", r=True):
164 if r:
165 path = self.rpath(path)
166 path = self.escape(path + self.get_sep(path))
167 vol = "" if self.vol else "%*%" # search any volume if none specified
168 # also lists hidden .dotfiles + special treatment for brother devices
169 str_recv = self.find(vol + path + "**") or self.find(vol + path + "*")
170 list = {name for name in str_recv.splitlines()}
171 return sorted(list)
172
173 def find(self, path):
174 str_send = '{false statusdict /setfilenameextend get exec} stopped\n'\

Callers 4

dir_existsMethod · 0.95
do_lsMethod · 0.95
do_findMethod · 0.95
do_mirrorMethod · 0.95

Calls 4

escapeMethod · 0.95
findMethod · 0.95
rpathMethod · 0.80
get_sepMethod · 0.80

Tested by

no test coverage detected