mirror of
https://github.com/rclone/rclone.git
synced 2025-06-05 20:34:39 +08:00
about: add new command 'about' to get quota info from a remote
Implemented for drive only. Relates to #1138 and #1564.
This commit is contained in:

committed by
Nick Craig-Wood

parent
b83814082b
commit
94e277d759
@ -1049,6 +1049,19 @@ func CleanUp(f fs.Fs) error {
|
||||
return doCleanUp()
|
||||
}
|
||||
|
||||
// About gets quota information from the remote
|
||||
func About(f fs.Fs) error {
|
||||
doAbout := f.Features().About
|
||||
if doAbout == nil {
|
||||
return errors.Errorf("%v doesn't support about", f)
|
||||
}
|
||||
if fs.Config.DryRun {
|
||||
fs.Logf(f, "Not running about as --dry-run set")
|
||||
return nil
|
||||
}
|
||||
return doAbout()
|
||||
}
|
||||
|
||||
// wrap a Reader and a Closer together into a ReadCloser
|
||||
type readCloser struct {
|
||||
io.Reader
|
||||
|
Reference in New Issue
Block a user