diff options
| author | Petter Rasmussen | 2015-05-23 22:42:28 +0200 |
|---|---|---|
| committer | Petter Rasmussen | 2015-05-23 22:42:28 +0200 |
| commit | 1cba1144f2860da6bf24552fdad84d4eab6e931a (patch) | |
| tree | b539d346bd44c88a2785dc2471f208f34cfbcd31 /drive.go | |
| parent | 1f613ca24a9ec4f7f64106df65f0d5fabe88da85 (diff) | |
| download | gdrive-1cba1144f2860da6bf24552fdad84d4eab6e931a.tar.bz2 | |
Add --bytes flag to list and info
Diffstat (limited to 'drive.go')
| -rw-r--r-- | drive.go | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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 |
