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

Method do_ls

pcl.py:120–127  ·  view source on GitHub ↗

List contents of virtual file system: ls

(self, arg)

Source from the content-addressed store, hash-verified

118
119 # ------------------------[ ls ]--------------------------------------
120 def do_ls(self, arg):
121 "List contents of virtual file system: ls"
122 pclfs = self.dirlist()
123 if not pclfs: # no files have yet been uploaded
124 output().raw("This is a virtual pclfs. Use 'put' to upload files.")
125 # list files with syntax highlighting
126 for name, (id, size, date) in sorted(pclfs.items()):
127 output().pcldir(size, conv().lsdate(int(date)), id, name)
128
129 # ====================================================================
130

Callers

nothing calls this directly

Calls 6

dirlistMethod · 0.95
outputClass · 0.90
convClass · 0.90
rawMethod · 0.80
pcldirMethod · 0.80
lsdateMethod · 0.80

Tested by

no test coverage detected