Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Feature Request] Add downloadTo to Storage Client #2107

Copy link
Copy link

Description

@frankyn
Issue body actions

Feature Request

The Java Cloud Storage client google-cloud-storage has a sample to download a Blob (shown below). The feature request is to add this functionality into the sample shown into an additional method downloadTo for Class Blob to reduce complexity of downloading a blob using the Java Storage client. At the moment other clients use this approach and allow a user to download a given Blob to a specified file.

xxnxbgjccop

Language Comparison:

In other client libraries (google-cloud-ruby) there exists a method to download a Blob to a specified file.

h4q4mswiyt0

Another example using .NET:

bbfhutvhz08

Example of usage

try {
  String bucketName = ”BUCKET_NAME”;
  String blobName = ”BLOB_NAME”;
 
  Blob blob = BlobId.of(bucketName, blobName);
  Path path = FileSystems.getDefault().getPath("output.ext”);
 
  blob.downloadTo(path);
} catch (IOException io) {
   //...
}
Reactions are currently unavailable

Metadata

Metadata

Labels

api: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.