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

Method vol_exists

postscript.py:113–122  ·  view source on GitHub ↗
(self, vol='')

Source from the content-addressed store, hash-verified

111 # --------------------------------------------------------------------
112 # check if remote volume exists
113 def vol_exists(self, vol=''):
114 if vol:
115 vol = '%' + vol.strip('%') + '%'
116 str_recv = self.cmd('/str 128 string def (*)'
117 + '{print (\\n) print} str devforall')
118 vols = str_recv.splitlines() + ['%*%']
119 if vol:
120 return vol in vols # return availability
121 else:
122 return vols # return list of existing vols
123
124 # check if remote directory exists
125 def dir_exists(self, path, list=[]):

Callers 1

do_dfMethod · 0.95

Calls 1

cmdMethod · 0.95

Tested by

no test coverage detected