Delete a file from the remote .. note:: If the project has not been opened, it will be opened upon calling this. :param file: File to delete :raises: RuntimeError if there was an error
(self, file: 'file.RemoteFile')
| 432 | raise RuntimeError(util._last_error()) |
| 433 | |
| 434 | def delete_file(self, file: 'file.RemoteFile'): |
| 435 | """ |
| 436 | Delete a file from the remote |
| 437 | |
| 438 | .. note:: If the project has not been opened, it will be opened upon calling this. |
| 439 | |
| 440 | :param file: File to delete |
| 441 | :raises: RuntimeError if there was an error |
| 442 | """ |
| 443 | if not self.open(): |
| 444 | raise RuntimeError("Failed to open project") |
| 445 | |
| 446 | if not core.BNRemoteProjectDeleteFile(self._handle, file._handle): |
| 447 | raise RuntimeError(util._last_error()) |
| 448 | |
| 449 | @property |
| 450 | def folders(self) -> List['folder.RemoteFolder']: |