aboutsummaryrefslogtreecommitdiffstats
path: root/cli/cli.go
diff options
context:
space:
mode:
authorPetter Rasmussen2015-05-23 14:32:19 +0200
committerPetter Rasmussen2015-05-23 14:32:19 +0200
commit3696f1bbc323dd58174a15f8522a73258f6d7015 (patch)
tree0dc71b7e68e1b60c1556d10d261a05ed820abc8d /cli/cli.go
parentdd1adb7b4abeeea1ba92bd23851f46382a618d60 (diff)
downloadgdrive-3696f1bbc323dd58174a15f8522a73258f6d7015.tar.bz2
Add flag --include-docs to include google docs in listing
Diffstat (limited to 'cli/cli.go')
-rw-r--r--cli/cli.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/cli.go b/cli/cli.go
index 38de1ba..93bca81 100644
--- a/cli/cli.go
+++ b/cli/cli.go
@@ -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
}