| 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=[]): |