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:
Nick Craig-Wood
2025-02-28 17:01:29 +00:00
parent b587b094c9
commit 533c6438f3
6 changed files with 207 additions and 1 deletions

View File

@@ -165,6 +165,11 @@ var OptionsInfo = fs.Options{{
Default: getGID(),
Help: "Override the gid field set by the filesystem (not supported on Windows)",
Groups: "VFS",
}, {
Name: "vfs_metadata_extension",
Default: "",
Help: "Set the extension to read metadata from.",
Groups: "VFS",
}}
func init() {
@@ -204,6 +209,7 @@ type Options struct {
UsedIsSize bool `config:"vfs_used_is_size"` // if true, use the `rclone size` algorithm for Used size
FastFingerprint bool `config:"vfs_fast_fingerprint"` // if set use fast fingerprints
DiskSpaceTotalSize fs.SizeSuffix `config:"vfs_disk_space_total_size"`
MetadataExtension string `config:"vfs_metadata_extension"` // if set respond to files with this extension with metadata
}
// Opt is the default options modified by the environment variables and command line flags