forked from rclone/rclone
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
about: add new command 'about' to get quota info from a remote
Implemented for drive only. Relates to rclone#1138 and rclone#1564.
- Loading branch information
Showing
9 changed files
with
130 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package about | ||
|
||
import ( | ||
"github.com/ncw/rclone/cmd" | ||
"github.com/ncw/rclone/fs/operations" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func init() { | ||
cmd.Root.AddCommand(commandDefintion) | ||
} | ||
|
||
var commandDefintion = &cobra.Command{ | ||
Use: "about remote:", | ||
Short: `Get quota information from the remote.`, | ||
Long: ` | ||
Get quota information from the remote, like bytes used/free/quota and bytes | ||
used in the trash. Not supported by all remotes. | ||
`, | ||
Run: func(command *cobra.Command, args []string) { | ||
cmd.CheckArgs(1, 1, command, args) | ||
fsrc := cmd.NewFsSrc(args) | ||
cmd.Run(true, false, command, func() error { | ||
return operations.About(fsrc) | ||
}) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters