-
Notifications
You must be signed in to change notification settings - Fork 592
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 deleteFiles() #698
storage: add deleteFiles() #698
Conversation
131e9db
to
1f61819
Compare
Sounds good to me. Hopefully later we can have this be atomic. For now, we should make it super clear in the documentation that it isn't atomic, and you might incur cost for a huge number of operations...... (ie, a big warning sign...) |
* for all of the supported properties. | ||
* @param {boolean} query.force - Supress errors until all files have been | ||
* processed. | ||
* @param {function} callback - The callback function. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
1f61819
to
4e68707
Compare
Ready for another check. Added the docs and also caught some probs with how array params were being displayed. Docs here: http://stephenplusplus.github.io/gcloud-node-gh-pages-again/#/docs/master/storage/bucket?method=deleteFiles |
OK LGTM but maybe @ryanseys should take a look ? |
return; | ||
} | ||
|
||
// Iterate through each file and make it public or private. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
LGTM other than the small comment to be updated. equal vs. strictEqual might be a repo-wide change to be made so if you don't change it in this PR that's nbd. Also you're comparing objects so |
Thanks for reviewing! I think we have a mixture, but I've been On Tuesday, July 7, 2015, Ryan Seys notifications@github.com wrote:
|
|
I'd say |
4e68707
to
8027b09
Compare
Changed to |
storage: add deleteFiles()
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 477248447 Source-Link: googleapis/googleapis@4689c73 Source-Link: googleapis/googleapis-gen@c405978 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzQwNTk3ODZhNWNkODA1YTAxNTFkOTViNDc3ZmJjNDg2YmNiY2VkYyJ9 docs: fix docstring formatting Committer: @parthea PiperOrigin-RevId: 476410563 Source-Link: googleapis/googleapis@7f579ee Source-Link: googleapis/googleapis-gen@ae0240e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWUwMjQwZTA5N2ExOTZjMDcwZTE1ZGVhYWU2NjQ2NGI0MmM4ZTAxNCJ9
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 477248447 Source-Link: googleapis/googleapis@4689c73 Source-Link: googleapis/googleapis-gen@c405978 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzQwNTk3ODZhNWNkODA1YTAxNTFkOTViNDc3ZmJjNDg2YmNiY2VkYyJ9 docs: fix docstring formatting Committer: @parthea PiperOrigin-RevId: 476410563 Source-Link: googleapis/googleapis@7f579ee Source-Link: googleapis/googleapis-gen@ae0240e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWUwMjQwZTA5N2ExOTZjMDcwZTE1ZGVhYWU2NjQ2NGI0MmM4ZTAxNCJ9
Fixes #680
Docs: http://stephenplusplus.github.io/gcloud-node-gh-pages-again/#/docs/master/storage/bucket?method=deleteFiles
Todos
This adds a new method on Bucket:
deleteFiles
.Old way of deleting all of the files in the bucket. No error handling, no throttling, no paging.
New way with error handling and throttling built in.
Behind the scenes,
deleteFiles
just callsgetFiles
. So, you're able to pass yourgetFiles
query object todeleteFiles
.By default, if an error occurs, no more files will be deleted. This can be shut off.