Skip to content

storage: add download() method#381

Merged
ryanseys merged 1 commit intogoogleapis:masterfrom
stephenplusplus:spp--storage-download
Feb 9, 2015
Merged

storage: add download() method#381
ryanseys merged 1 commit intogoogleapis:masterfrom
stephenplusplus:spp--storage-download

Conversation

@stephenplusplus
Copy link
Copy Markdown
Contributor

Fixes #367

Adds a download method to a File object:

// Getting the contents of a file.
file.download(function(err, contents) {})
file.download({ start: 0, end: 100 }, function(err, contents) {});

// Writing the file to a local destination
file.download({ destination: '/Users/stephen/file.txt' }, function(err) {});
file.download({ start: 0, end: 100, destination: '/Users/stephen/file.txt' }, function(err) {});

This method just blankets file.createReadStream(options), so the options passed to download are passed up to createReadStream.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 4, 2015
Comment thread lib/storage/file.js

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@ryanseys ryanseys mentioned this pull request Feb 5, 2015
@ryanseys
Copy link
Copy Markdown
Contributor

ryanseys commented Feb 9, 2015

Will require a rebase

@stephenplusplus
Copy link
Copy Markdown
Contributor Author

Using the new once module + rebased.

ryanseys added a commit that referenced this pull request Feb 9, 2015
@ryanseys ryanseys merged commit b52b28b into googleapis:master Feb 9, 2015
@ryanseys
Copy link
Copy Markdown
Contributor

ryanseys commented Feb 9, 2015

LGTM! :) 🚢

chingor13 pushed a commit that referenced this pull request Aug 22, 2022
…ed existing docs. (#381)

Clients receive detailed OutputResult in ExportAssetsResponse.

PiperOrigin-RevId: 326582222

Source-Author: Google APIs <[email protected]>
Source-Date: Thu Aug 13 20:45:57 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 3a54e988edcbdef1e47c6ac19d3074a87214f667
Source-Link: googleapis/googleapis@3a54e98
sofisl pushed a commit that referenced this pull request Sep 15, 2022
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [null-loader](https://togithub.com/webpack-contrib/null-loader) | devDependencies | major | [`^3.0.0` -> `^4.0.0`](https://renovatebot.com/diffs/npm/null-loader/3.0.0/4.0.0) |

---

### Release Notes

<details>
<summary>webpack-contrib/null-loader</summary>

### [`v4.0.0`](https://togithub.com/webpack-contrib/null-loader/blob/master/CHANGELOG.md#&#8203;400-httpsgithubcomwebpack-contribnull-loadercomparev300v400-2020-04-15)

[Compare Source](https://togithub.com/webpack-contrib/null-loader/compare/v3.0.0...v4.0.0)

##### Bug Fixes

-   support `webpack@5`

##### ⚠ BREAKING CHANGES

-   minimum required Nodejs version is `10.13`

</details>

---

### Renovate configuration

:date: **Schedule**: "after 9am and before 3pm" (UTC).

:vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

:recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

:no_bell: **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-redis).
sofisl pushed a commit that referenced this pull request Oct 13, 2022
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@types/mocha](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^8.0.0` -> `^9.0.0`](https://renovatebot.com/diffs/npm/@types%2fmocha/8.2.3/9.1.1) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/compatibility-slim/8.2.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/confidence-slim/8.2.3)](https://docs.renovatebot.com/merge-confidence/) |

---

### Configuration

📅 **Schedule**: "after 9am and before 3pm" (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-phishing-protection).
sofisl pushed a commit that referenced this pull request Nov 11, 2022
GautamSharda pushed a commit that referenced this pull request Feb 5, 2026
* fix(docs): reference docs should link to section of googleapis.dev with API reference

* fix(docs): make anchors work in jsdoc
GautamSharda pushed a commit that referenced this pull request Feb 23, 2026
* fix(docs): reference docs should link to section of googleapis.dev with API reference

* fix(docs): make anchors work in jsdoc
sofisl pushed a commit that referenced this pull request Feb 24, 2026
sofisl pushed a commit that referenced this pull request Feb 25, 2026
GautamSharda pushed a commit that referenced this pull request Feb 25, 2026
* fix: Add `system-test/fixtures` to `.eslintignore`

* refactor: Use `**`

Source-Link: googleapis/synthtool@b7858ba
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:abc68a9bbf4fa808b25fa16d3b11141059dc757dbc34f024744bba36c200b40f

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
GautamSharda pushed a commit that referenced this pull request Feb 26, 2026
* fix(docs): reference docs should link to section of googleapis.dev with API reference

* fix(docs): make anchors work in jsdoc
GautamSharda pushed a commit that referenced this pull request Mar 11, 2026
thiyaguk09 pushed a commit to thiyaguk09/google-cloud-node-fork that referenced this pull request Mar 18, 2026
GautamSharda pushed a commit that referenced this pull request Mar 23, 2026
GautamSharda pushed a commit that referenced this pull request Mar 25, 2026
shivanee-p pushed a commit that referenced this pull request Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add download() method

4 participants