Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

vfs: add Fs() method to return underlying fs.Fs

Nick Craig-Wooda7eec91d69ef
diff --git a/vfs/vfs.go b/vfs/vfs.go
index 5e8608241..9fae2fbd0 100644
--- a/vfs/vfs.go
+++ b/vfs/vfs.go
@@ -242,6 +242,11 @@ func New(f fs.Fs, opt *Options) *VFS {
return vfs
}
+// Fs returns the Fs passed into the New call
+func (vfs *VFS) Fs() fs.Fs {
+ return vfs.f
+}
+
// SetCacheMode change the cache mode
func (vfs *VFS) SetCacheMode(cacheMode CacheMode) {
vfs.Shutdown()