(self, path, list=[])
| 123 | |
| 124 | # check if remote directory exists |
| 125 | def dir_exists(self, path, list=[]): |
| 126 | path = self.escape(path) |
| 127 | if self.fuzz and not list: # use status instead of filenameforall |
| 128 | return (self.file_exists(path) != c.NONEXISTENT) |
| 129 | # use filenameforall as some ps interpreters do not support status |
| 130 | if not list: |
| 131 | list = self.dirlist(path, False) |
| 132 | for name in list: # use dirlist to check if directory |
| 133 | if re.search("^(%.*%)?" + path + c.SEP, name): |
| 134 | return True |
| 135 | |
| 136 | # check if remote file exists |
| 137 | def file_exists(self, path, ls=False): |
no test coverage detected