add support for metadata plugins

This commit is contained in:
Nicola Murino
2021-12-16 18:18:36 +01:00
parent 1472a0f415
commit a587228cf0
37 changed files with 2283 additions and 132 deletions

View File

@@ -192,6 +192,18 @@ func (v *VirtualFolder) GetFilesystem(connectionID string, forbiddenSelfUsers []
}
}
// CheckMetadataConsistency checks the consistency between the metadata stored
// in the configured metadata plugin and the filesystem
func (v *VirtualFolder) CheckMetadataConsistency() error {
fs, err := v.GetFilesystem("", nil)
if err != nil {
return err
}
defer fs.Close()
return fs.CheckMetadata()
}
// ScanQuota scans the folder and returns the number of files and their size
func (v *VirtualFolder) ScanQuota() (int, int64, error) {
fs, err := v.GetFilesystem("", nil)