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

Method do_cat

printer.py:527–535  ·  view source on GitHub ↗

Output remote file to stdout: cat

(self, arg)

Source from the content-addressed store, hash-verified

525
526 # ------------------------[ cat <file> ]------------------------------
527 def do_cat(self, arg):
528 "Output remote file to stdout: cat <file>"
529 if not arg:
530 arg = eval(input("Remote file: "))
531 path = self.rpath(arg)
532 str_recv = self.get(path)
533 if str_recv != c.NONEXISTENT:
534 rsize, data = str_recv
535 output().raw(data.strip())
536
537 # ------------------------[ edit <file> ]-----------------------------
538 def do_edit(self, arg):

Callers

nothing calls this directly

Calls 4

rpathMethod · 0.95
outputClass · 0.90
rawMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected