Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storage: add download() method #381

Merged
merged 1 commit into from
Feb 9, 2015

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
fileStream
.on('error', callback)
.pipe(fs.createWriteStream(destination))
.on('error', callback)

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
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 <[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 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 Nov 11, 2022
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/4de22315-84b1-493d-8da2-dfa7688128f5/targets

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

Source-Link: googleapis/synthtool@94421c4
sofisl pushed a commit that referenced this pull request Nov 11, 2022
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [jsdoc](https://togithub.com/jsdoc/jsdoc) | [`^3.6.2` -> `^4.0.0`](https://renovatebot.com/diffs/npm/jsdoc/3.6.11/4.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/compatibility-slim/3.6.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/confidence-slim/3.6.11)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>jsdoc/jsdoc</summary>

### [`v4.0.0`](https://togithub.com/jsdoc/jsdoc/blob/HEAD/CHANGES.md#&#8203;400-November-2022)

[Compare Source](https://togithub.com/jsdoc/jsdoc/compare/3.6.11...084218523a7d69fec14a852ce680f374f526af28)

-   JSDoc releases now use [semantic versioning](https://semver.org/). If JSDoc makes
    backwards-incompatible changes in the future, the major version will be incremented.
-   JSDoc no longer uses the [`taffydb`](https://taffydb.com/) package. If your JSDoc template or
    plugin uses the `taffydb` package, see the
    [instructions for replacing `taffydb` with `@jsdoc/salty`](https://togithub.com/jsdoc/jsdoc/tree/main/packages/jsdoc-salty#use-salty-in-a-jsdoc-template).
-   JSDoc now supports Node.js 12.0.0 and later.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined).

🚦 **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, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-datalabeling).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNy4xIiwidXBkYXRlZEluVmVyIjoiMzQuMTcuMSJ9-->
sofisl pushed a commit that referenced this pull request Nov 11, 2022
🤖 I have created a release *beep* *boop*
---


## [4.0.1](googleapis/nodejs-secret-manager@v4.0.0...v4.0.1) (2022-06-30)


### Bug Fixes

* **docs:** describe fallback rest option ([#379](googleapis/nodejs-secret-manager#379)) ([368cff5](googleapis/nodejs-secret-manager@368cff5))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
sofisl pushed a commit that referenced this pull request Nov 11, 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 Nov 11, 2022
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 408439482

Source-Link: googleapis/googleapis@b9f6184

Source-Link: googleapis/googleapis-gen@eb888bc
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWI4ODhiYzIxNGVmYzdiZjQzYmY0NjM0YjQ3MDI1NDU2NWE2NTlhNSJ9
sofisl pushed a commit that referenced this pull request Nov 16, 2022
This reverts commit 086cb96c21d21821619143f7ebbc33b5ade49a74.
sofisl pushed a commit that referenced this pull request Nov 17, 2022
sofisl pushed a commit that referenced this pull request Nov 18, 2022
* chore: release 5.3.0

* 🦉 Updates from OwlBot

* 🦉 Updates from OwlBot

* 🦉 Updates from OwlBot

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
sofisl pushed a commit that referenced this pull request Nov 30, 2022
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 470911839

Source-Link: googleapis/googleapis@3527566

Source-Link: googleapis/googleapis-gen@f16a1d2
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjE2YTFkMjI0ZjAwYTYzMGVhNDNkNmE5YTFhMzFmNTY2ZjQ1Y2RlYSJ9

feat: accept google-gax instance as a parameter
Please see the documentation of the client constructor for details.

PiperOrigin-RevId: 470332808

Source-Link: googleapis/googleapis@d4a2367

Source-Link: googleapis/googleapis-gen@e97a1ac
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTk3YTFhYzIwNGVhZDRmZTczNDFmOTFlNzJkYjdjNmFjNjAxNjM0MSJ9
sofisl pushed a commit that referenced this pull request Sep 13, 2023
sofisl pushed a commit that referenced this pull request Sep 14, 2023
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