mirror of
https://github.com/rclone/rclone.git
synced 2025-12-06 00:03:32 +00:00
vfs: add --vfs-metadata-extension to expose metadata sidecar files
This adds --vfs-metadata-extension which can be used to expose sidecar files with file metadata in. These files don't exist in the listings until they are accessed.
This commit is contained in:
12
vfs/vfs.go
12
vfs/vfs.go
@@ -900,3 +900,15 @@ func (vfs *VFS) Symlink(oldname, newname string) error {
|
||||
_, err := vfs.CreateSymlink(oldname, newname)
|
||||
return err
|
||||
}
|
||||
|
||||
// Return true if name represents a metadata file
|
||||
//
|
||||
// It returns the underlying path
|
||||
func (vfs *VFS) isMetadataFile(name string) (rawName string, found bool) {
|
||||
ext := vfs.Opt.MetadataExtension
|
||||
if ext == "" {
|
||||
return name, false
|
||||
}
|
||||
rawName, found = strings.CutSuffix(name, ext)
|
||||
return rawName, found
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user