aboutsummaryrefslogtreecommitdiffstats
path: root/gdrive.go
diff options
context:
space:
mode:
authorPetter Rasmussen2016-01-23 17:22:37 +0100
committerPetter Rasmussen2016-01-23 17:22:37 +0100
commita4217d488c382bee3e9f7faf33ec3d139ba54cd5 (patch)
tree6e359d48ca385b9abfcc300eca5f1b8834f6d249 /gdrive.go
parente3aa4296e9fc875866d907df341637db4ac8c815 (diff)
downloadgdrive-a4217d488c382bee3e9f7faf33ec3d139ba54cd5.tar.bz2
Implement update
Diffstat (limited to 'gdrive.go')
-rw-r--r--gdrive.go43
1 files changed, 43 insertions, 0 deletions
diff --git a/gdrive.go b/gdrive.go
index 967f6ec..354f272 100644
--- a/gdrive.go
+++ b/gdrive.go
@@ -202,6 +202,49 @@ func main() {
},
},
&cli.Handler{
+ Pattern: "[global options] update [options] <id> <path>",
+ Description: "Update file, this creates a new revision of the file",
+ Callback: updateHandler,
+ Flags: cli.Flags{
+ "global options": globalFlags,
+ "options": []cli.Flag{
+ cli.StringSliceFlag{
+ Name: "parent",
+ Patterns: []string{"-p", "--parent"},
+ Description: "Parent id, used to upload file to a specific directory, can be specified multiple times to give many parents",
+ },
+ cli.StringFlag{
+ Name: "name",
+ Patterns: []string{"--name"},
+ Description: "Filename",
+ },
+ cli.BoolFlag{
+ Name: "noProgress",
+ Patterns: []string{"--no-progress"},
+ Description: "Hide progress",
+ OmitValue: true,
+ },
+ cli.BoolFlag{
+ Name: "stdin",
+ Patterns: []string{"--stdin"},
+ Description: "Use stdin as file content",
+ OmitValue: true,
+ },
+ cli.StringFlag{
+ Name: "mime",
+ Patterns: []string{"--mime"},
+ Description: "Force mime type",
+ },
+ cli.BoolFlag{
+ Name: "share",
+ Patterns: []string{"--share"},
+ Description: "Share file",
+ OmitValue: true,
+ },
+ },
+ },
+ },
+ &cli.Handler{
Pattern: "[global options] info [options] <id>",
Description: "Show file info",
Callback: infoHandler,