conditional support for recursive renaming for cloud providers

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2023-01-06 12:33:50 +01:00
parent f0dedbfabf
commit 8cad436421
26 changed files with 650 additions and 473 deletions

View File

@@ -138,11 +138,12 @@ func (fs MockOsFs) Remove(name string, isDir bool) error {
}
// Rename renames (moves) source to target
func (fs MockOsFs) Rename(source, target string) error {
func (fs MockOsFs) Rename(source, target string) (int, int64, error) {
if fs.err != nil {
return fs.err
return -1, -1, fs.err
}
return os.Rename(source, target)
err := os.Rename(source, target)
return -1, -1, err
}
func newMockOsFs(err, statErr error, atomicUpload bool, connectionID, rootDir string) vfs.Fs {