mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
vfs: --vfs-used-is-size to report used space using recursive scan (#4043)
Some backends, most notably S3, do not report the amount of bytes used. This patch introduces a new flag that allows instead of relying on the backend, use recursive scan similar to `rclone size` to compute the total used space. However, this is ineffective and should be used as a last resort. Co-authored-by: Yves G <theYinYeti@yalis.fr>
This commit is contained in:
@@ -32,6 +32,7 @@ type Options struct {
|
||||
ReadWait time.Duration // time to wait for in-sequence read
|
||||
WriteBack time.Duration // time to wait before writing back dirty files
|
||||
ReadAhead fs.SizeSuffix // bytes to read ahead in cache mode "full"
|
||||
UsedIsSize bool // if true, use the `rclone size` algorithm for Used size
|
||||
}
|
||||
|
||||
// DefaultOpt is the default values uses for Opt
|
||||
@@ -58,4 +59,5 @@ var DefaultOpt = Options{
|
||||
ReadWait: 20 * time.Millisecond,
|
||||
WriteBack: 5 * time.Second,
|
||||
ReadAhead: 0 * fs.MebiByte,
|
||||
UsedIsSize: false,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user