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:
parent
b83814082b
commit
94e277d759
9 changed files with 130 additions and 21 deletions
13
backend/cache/cache.go
vendored
13
backend/cache/cache.go
vendored
|
@ -1413,6 +1413,18 @@ func (f *Fs) CleanUp() error {
|
|||
return do()
|
||||
}
|
||||
|
||||
// About gets quota information from the Fs
|
||||
func (f *Fs) About() error {
|
||||
f.CleanUpCache(false)
|
||||
|
||||
do := f.Fs.Features().About
|
||||
if do == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
return do()
|
||||
}
|
||||
|
||||
// Stats returns stats about the cache storage
|
||||
func (f *Fs) Stats() (map[string]map[string]interface{}, error) {
|
||||
return f.cache.Stats()
|
||||
|
@ -1551,4 +1563,5 @@ var (
|
|||
_ fs.Wrapper = (*Fs)(nil)
|
||||
_ fs.ListRer = (*Fs)(nil)
|
||||
_ fs.ChangeNotifier = (*Fs)(nil)
|
||||
_ fs.Abouter = (*Fs)(nil)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue