recursive permissions check before renaming/copying directories

This commit is contained in:
Nicola Murino
2020-06-26 23:38:29 +02:00
parent 19fc58dd1f
commit cf541d62ea
17 changed files with 414 additions and 81 deletions

View File

@@ -8,6 +8,7 @@ import (
"fmt"
"os"
"path"
"path/filepath"
"strings"
"time"
@@ -441,7 +442,7 @@ func (fs S3Fs) ScanRootDirContents() (int, int64, error) {
// GetDirSize returns the number of files and the size for a folder
// including any subfolders
func (S3Fs) GetDirSize(dirname string) (int, int64, error) {
return 0, 0, errors.New("Not implemented")
return 0, 0, errUnsupported
}
// GetAtomicUploadPath returns the path to use for an atomic upload.
@@ -469,6 +470,12 @@ func (fs S3Fs) GetRelativePath(name string) string {
return rel
}
// Walk walks the file tree rooted at root, calling walkFn for each file or
// directory in the tree, including root
func (S3Fs) Walk(root string, walkFn filepath.WalkFunc) error {
return errUnsupported
}
// Join joins any number of path elements into a single path
func (S3Fs) Join(elem ...string) string {
return path.Join(elem...)