aboutsummaryrefslogtreecommitdiffstats
path: root/drive.go
diff options
context:
space:
mode:
authorPetter Rasmussen2015-05-23 22:42:28 +0200
committerPetter Rasmussen2015-05-23 22:42:28 +0200
commit1cba1144f2860da6bf24552fdad84d4eab6e931a (patch)
treeb539d346bd44c88a2785dc2471f208f34cfbcd31 /drive.go
parent1f613ca24a9ec4f7f64106df65f0d5fabe88da85 (diff)
downloadgdrive-1cba1144f2860da6bf24552fdad84d4eab6e931a.tar.bz2
Add --bytes flag to list and info
Diffstat (limited to 'drive.go')
-rw-r--r--drive.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/drive.go b/drive.go
index 1786e68..667d0eb 100644
--- a/drive.go
+++ b/drive.go
@@ -29,10 +29,12 @@ type Options struct {
Query string `goptions:"-q, --query, mutexgroup='query', description='Query (see https://developers.google.com/drive/search-parameters)'"`
SharedStatus bool `goptions:"-s, --shared, description='Show shared status (Note: this will generate 1 http req per file)'"`
NoHeader bool `goptions:"-n, --noheader, description='Do not show the header'"`
+ SizeInBytes bool `goptions:"--bytes, description='Show size in bytes'"`
} `goptions:"list"`
Info struct {
- FileId string `goptions:"-i, --id, obligatory, description='File Id'"`
+ FileId string `goptions:"-i, --id, obligatory, description='File Id'"`
+ SizeInBytes bool `goptions:"--bytes, description='Show size in bytes'"`
} `goptions:"info"`
Folder struct {
@@ -102,10 +104,10 @@ func main() {
switch opts.Verbs {
case "list":
args := opts.List
- err = cli.List(drive, args.Query, args.TitleFilter, args.MaxResults, args.SharedStatus, args.NoHeader, args.IncludeDocs)
+ err = cli.List(drive, args.Query, args.TitleFilter, args.MaxResults, args.SharedStatus, args.NoHeader, args.IncludeDocs, args.SizeInBytes)
case "info":
- err = cli.Info(drive, opts.Info.FileId)
+ err = cli.Info(drive, opts.Info.FileId, opts.Info.SizeInBytes)
case "folder":
args := opts.Folder