Skip to content

Commit

Permalink
Make download_content public in Client.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterhuene committed Dec 3, 2023
1 parent a3c7ce6 commit cc26357
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,11 @@ impl<R: RegistryStorage, C: ContentStorage> Client<R, C> {
Ok(record)
}

async fn download_content(&self, digest: &AnyHash) -> Result<PathBuf, ClientError> {
/// Downloads the content for the specified digest into client storage.
///
/// If the content already exists in client storage, the existing path
/// is returned.
pub async fn download_content(&self, digest: &AnyHash) -> Result<PathBuf, ClientError> {
match self.content.content_location(digest) {
Some(path) => {
tracing::info!("content for digest `{digest}` already exists in storage");
Expand Down

0 comments on commit cc26357

Please sign in to comment.