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
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
.on('error', callback)
.on('finish', callback);
} else {
var fileContents = new Buffer('');

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
Contributor

ryanseys commented Feb 9, 2015

Will require a rebase

@stephenplusplus
Copy link
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
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 <noreply@google.com>
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 11, 2022
🤖 I have created a release \*beep\* \*boop\* 
---
## [3.8.0](https://www.github.com/googleapis/nodejs-language/compare/v3.7.2...v3.8.0) (2020-02-28)


### Features

* export protos in src/index.ts ([482fb10](https://www.github.com/googleapis/nodejs-language/commit/482fb10bc1d4f01bd3de38a0301cda2a2efb491d))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please).
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 Oct 13, 2022
🤖 I have created a release \*beep\* \*boop\* 
---
## [3.8.0](https://www.github.com/googleapis/nodejs-language/compare/v3.7.2...v3.8.0) (2020-02-28)


### Features

* export protos in src/index.ts ([482fb10](https://www.github.com/googleapis/nodejs-language/commit/482fb10bc1d4f01bd3de38a0301cda2a2efb491d))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please).
sofisl pushed a commit that referenced this pull request Nov 11, 2022
…381)

This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/a8ab5675-1982-4cf5-b9b7-36794038b975/targets

- [ ] To automatically regenerate this PR, check this box.

Source-Link: googleapis/synthtool@8cf6d28
sofisl pushed a commit that referenced this pull request Sep 14, 2023
GautamSharda pushed a commit that referenced this pull request Jan 14, 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 Jan 15, 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 5, 2026
* fix(docs): reference docs should link to section of googleapis.dev with API reference

* fix(docs): make anchors work in jsdoc
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

Comments