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

Method do_df

postscript.py:309–318  ·  view source on GitHub ↗

Show volume information.

(self, arg)

Source from the content-addressed store, hash-verified

307
308 # ------------------------[ df ]--------------------------------------
309 def do_df(self, arg):
310 "Show volume information."
311 output().df(('VOLUME', 'TOTAL SIZE', 'FREE SPACE', 'PRIORITY',
312 'REMOVABLE', 'MOUNTED', 'HASNAMES', 'WRITEABLE', 'SEARCHABLE'))
313 for vol in self.vol_exists():
314 str_send = '(' + vol + ') devstatus dup {pop ' + '== ' * 8 + '} if'
315 lst_recv = self.cmd(str_send).splitlines()
316 values = (vol,) + tuple(lst_recv if len(lst_recv)
317 == 8 else ['-'] * 8)
318 output().df(values)
319
320 # ------------------------[ free ]------------------------------------
321 def do_free(self, arg):

Callers

nothing calls this directly

Calls 4

vol_existsMethod · 0.95
cmdMethod · 0.95
outputClass · 0.90
dfMethod · 0.80

Tested by

no test coverage detected