| 269 | raise CommandException(f"Could not upload file.") |
| 270 | |
| 271 | def _Base__rm(self, options: str): |
| 272 | out = self.__eval(f"$out='File does not exist.';" |
| 273 | f"if(file_exists('{options}')){{" |
| 274 | f"$out='Done.';" |
| 275 | f"if(is_dir('{options}')){{" |
| 276 | f"if(!rmdir('{options}')){{" |
| 277 | f"$out='Not empty';}}" |
| 278 | f"}}else{{if(!unlink('{options}')){{" |
| 279 | f"$out='Could not delete';}}}}" |
| 280 | f"}}" |
| 281 | f"header('{self.header}: ' . " |
| 282 | f"$out);") |
| 283 | print(out) |
| 284 | |
| 285 | def _Base__mkdir(self, options: str): |
| 286 | out = self.__eval(f"$out='Already exists.';" |