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

@@ -384,7 +384,7 @@ func (fs *SFTPFs) Chmod(name string, mode os.FileMode) error {
}
// Chtimes changes the access and modification times of the named file.
func (fs *SFTPFs) Chtimes(name string, atime, mtime time.Time) error {
func (fs *SFTPFs) Chtimes(name string, atime, mtime time.Time, isUploading bool) error {
if err := fs.checkConnection(); err != nil {
return err
}
@@ -464,6 +464,11 @@ func (fs *SFTPFs) ScanRootDirContents() (int, int64, error) {
return fs.GetDirSize(fs.config.Prefix)
}
// CheckMetadata checks the metadata consistency
func (*SFTPFs) CheckMetadata() error {
return nil
}
// GetAtomicUploadPath returns the path to use for an atomic upload
func (*SFTPFs) GetAtomicUploadPath(name string) string {
dir := path.Dir(name)