mirror of
https://github.com/rclone/rclone.git
synced 2025-12-15 15:53:41 +00:00
feat: add multiple paths support to --compare-dest and --copy-dest flag
This commit is contained in:
13
fs/cache/cache.go
vendored
13
fs/cache/cache.go
vendored
@@ -104,6 +104,19 @@ func Get(ctx context.Context, fsString string) (f fs.Fs, err error) {
|
||||
return GetFn(ctx, fsString, fs.NewFs)
|
||||
}
|
||||
|
||||
// GetArr gets []fs.Fs from []fsStrings either from the cache or creates it afresh
|
||||
func GetArr(ctx context.Context, fsStrings []string) (f []fs.Fs, err error) {
|
||||
var fArr []fs.Fs
|
||||
for _, fsString := range fsStrings {
|
||||
f1, err1 := GetFn(ctx, fsString, fs.NewFs)
|
||||
if err1 != nil {
|
||||
return fArr, err1
|
||||
}
|
||||
fArr = append(fArr, f1)
|
||||
}
|
||||
return fArr, nil
|
||||
}
|
||||
|
||||
// Put puts an fs.Fs named fsString into the cache
|
||||
func Put(fsString string, f fs.Fs) {
|
||||
canonicalName := fs.ConfigString(f)
|
||||
|
||||
Reference in New Issue
Block a user