mirror of
https://github.com/rclone/rclone.git
synced 2025-06-04 19:24:35 +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
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)
|
||||
)
|
||||
|
Reference in New Issue
Block a user