Delete a file on remote box. :param path: Path to remote file to be deleted. :type path: ``str`` :return: True if the file has been successfully deleted, False otherwise. :rtype: ``bool``
(self, path)
| 329 | return self.sftp.mkdir(dir_path) |
| 330 | |
| 331 | def delete_file(self, path): |
| 332 | """ |
| 333 | Delete a file on remote box. |
| 334 | |
| 335 | :param path: Path to remote file to be deleted. |
| 336 | :type path: ``str`` |
| 337 | |
| 338 | :return: True if the file has been successfully deleted, False |
| 339 | otherwise. |
| 340 | :rtype: ``bool`` |
| 341 | """ |
| 342 | |
| 343 | path = quote_unix(path) |
| 344 | extra = {"_path": path} |
| 345 | self.logger.debug("Deleting file", extra=extra) |
| 346 | self.sftp.unlink(path) |
| 347 | return True |
| 348 | |
| 349 | def delete_dir(self, path, force=False, timeout=None): |
| 350 | """ |