diff options
| author | Petter Rasmussen | 2016-02-07 14:34:48 +0100 |
|---|---|---|
| committer | Petter Rasmussen | 2016-02-07 14:35:00 +0100 |
| commit | c45e61e6406c188bcad432233a6eb25b4307a536 (patch) | |
| tree | 69ec8eff240681b62cdff99e3ed063e27b3e044e /gdrive.go | |
| parent | 68dccc08494aff71945735c8cf4e4158fc939254 (diff) | |
| download | gdrive-c45e61e6406c188bcad432233a6eb25b4307a536.tar.bz2 | |
Add sync list recursive command
Diffstat (limited to 'gdrive.go')
| -rw-r--r-- | gdrive.go | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -12,6 +12,7 @@ const Version = "2.0.0" const DefaultMaxFiles = 30 const DefaultMaxChanges = 100 const DefaultNameWidth = 40 +const DefaultPathWidth = 60 const DefaultUploadChunkSize = 8 * 1024 * 1024 const DefaultQuery = "trashed = false and 'me' in owners" const DefaultShareRole = "reader" @@ -353,6 +354,39 @@ func main() { }, }, &cli.Handler{ + Pattern: "[global] sync list recursive [options] <id>", + Description: "List content of syncable directory", + Callback: listRecursiveSyncHandler, + FlagGroups: cli.FlagGroups{ + cli.NewFlagGroup("global", globalFlags...), + cli.NewFlagGroup("options", + cli.StringFlag{ + Name: "sortOrder", + Patterns: []string{"--order"}, + Description: "Sort order. See https://godoc.org/google.golang.org/api/drive/v3#FilesListCall.OrderBy", + }, + cli.IntFlag{ + Name: "pathWidth", + Patterns: []string{"--path-width"}, + Description: fmt.Sprintf("Width of path column, default: %d, minimum: 9, use 0 for full width", DefaultPathWidth), + DefaultValue: DefaultPathWidth, + }, + cli.BoolFlag{ + Name: "skipHeader", + Patterns: []string{"--no-header"}, + Description: "Dont print the header", + OmitValue: true, + }, + cli.BoolFlag{ + Name: "sizeInBytes", + Patterns: []string{"--bytes"}, + Description: "Size in bytes", + OmitValue: true, + }, + ), + }, + }, + &cli.Handler{ Pattern: "[global] sync download [options] <id> <path>", Description: "Sync drive directory to local directory", Callback: downloadSyncHandler, |
