Skip to content

Commit d56b912

Browse files
author
remi Taylor
committed
Add new README for Storage samples with usage
1 parent 1197dd1 commit d56b912

File tree

1 file changed

+58
-1
lines changed

1 file changed

+58
-1
lines changed

storage/README.md

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,58 @@
1-
# Google Cloud Storage Ruby samples
1+
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>
2+
3+
# Google Cloud Storage Ruby Samples
4+
5+
[Cloud Storage][storage_docs] allows world-wide storage and retrieval of any
6+
amount of data at any time.
7+
8+
[storage_docs]: https://cloud.google.com/storage/docs/
9+
10+
## Run sample
11+
12+
To run the sample, first install dependencies:
13+
14+
bundle install
15+
16+
Run the sample:
17+
18+
bundle exec ruby buckets.rb
19+
bundle exec ruby files.rb
20+
21+
## Samples
22+
23+
### Buckets
24+
25+
**Usage:** `bundle exec ruby buckets.rb [command] [arguments]`
26+
27+
```
28+
sage: bundle exec ruby buckets.rb [command] [arguments]
29+
30+
Commands:
31+
list List all buckets in the authenticated project
32+
create <bucket> Create a new bucket with the provided name
33+
delete <bucket> Delete bucket with the provided name
34+
35+
Environment variables:
36+
GCLOUD_PROJECT must be set to your Google Cloud project ID
37+
```
38+
39+
### Files
40+
41+
**Usage:** `bundle exec ruby files.rb [command] [arguments]`
42+
43+
```
44+
Usage: bundle exec ruby files.rb [command] [arguments]
45+
46+
Commands:
47+
list <bucket> List all files in the bucket
48+
upload <bucket> <file> Upload local file to a bucket
49+
download <bucket> <file> <path> Download a file from a bucket
50+
delete <bucket> <file> Delete a file from a bucket
51+
metadata <bucket> <file> Display metadata for a file in a bucket
52+
make_public <bucket> <file> Make a file in a bucket public
53+
rename <bucket> <file> <new> Rename a file in a bucket
54+
copy <srcBucket> <srcFile> <destBucket> <destFile> Copy file to other bucket
55+
56+
Environment variables:
57+
GCLOUD_PROJECT must be set to your Google Cloud project ID
58+
```

0 commit comments

Comments
 (0)