Download a remote file and save it to a BNDB at the given `path`, returning the associated [`FileMetadata`].
(&self, path: S)
| 455 | |
| 456 | /// Download a remote file and save it to a BNDB at the given `path`, returning the associated [`FileMetadata`]. |
| 457 | pub fn download_database<S: BnStrCompatible>(&self, path: S) -> Result<Ref<FileMetadata>, ()> { |
| 458 | let file = self.download(path)?; |
| 459 | let database = file.database().ok_or(())?; |
| 460 | self.sync(&database, DatabaseConflictHandlerFail, NoNameChangeset)?; |
| 461 | Ok(file) |
| 462 | } |
| 463 | |
| 464 | // TODO: This might be a bad helper... maybe remove... |
| 465 | // TODO: AsRef<Path> |