diff options
| author | Petter Rasmussen | 2015-05-23 14:32:19 +0200 |
|---|---|---|
| committer | Petter Rasmussen | 2015-05-23 14:32:19 +0200 |
| commit | 3696f1bbc323dd58174a15f8522a73258f6d7015 (patch) | |
| tree | 0dc71b7e68e1b60c1556d10d261a05ed820abc8d /cli/cli.go | |
| parent | dd1adb7b4abeeea1ba92bd23851f46382a618d60 (diff) | |
| download | gdrive-3696f1bbc323dd58174a15f8522a73258f6d7015.tar.bz2 | |
Add flag --include-docs to include google docs in listing
Diffstat (limited to 'cli/cli.go')
| -rw-r--r-- | cli/cli.go | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -13,7 +13,7 @@ import ( "strings" ) -func List(d *gdrive.Drive, query, titleFilter string, maxResults int, sharedStatus bool, noHeader bool) error { +func List(d *gdrive.Drive, query, titleFilter string, maxResults int, sharedStatus bool, noHeader bool, includeDocs bool) error { caller := d.Files.List() if maxResults > 0 { @@ -37,8 +37,7 @@ func List(d *gdrive.Drive, query, titleFilter string, maxResults int, sharedStat items := make([]map[string]string, 0, 0) for _, f := range list.Items { - // Skip files that dont have a download url (they are not stored on google drive) - if f.DownloadUrl == "" { + if f.DownloadUrl == "" && !includeDocs { if f.MimeType != "application/vnd.google-apps.folder" { continue } |
