Object key remote directory filter clarification

The :memory: remote is an object remote. Testing command line stuff against it is hard though since it forgets everything on every command invocation!

So far so good

That is not entirely true

Nor is that.

The optimization we are talking about is not recursing into dir if rclone can prove to itself that it doesn't need to because the filters exclude everything in dir.

This is done for all remotes if not using the ListR (list recursive) primitive.

ListR will be used if the remote supports it and you specify --fast-list.

ListR will also be used for naturally recursive rclone calls, eg rclone ls, rclone lsf -R, rclone size etc.

ListR will not be used for sync/copy/move unless you specify --fast-list.

Which remotes support ListR is in the overview table - you'll see this is mostly the bucket based ones, but there are some exceptions like Google Drive.

Now that was a lot to take in - probably too much for this doc. Maybe something like

Rclone uses directory filter matches to decide whether to recurse into
directories, and to optimise access to a remote so it doesn't list directories it doesn't have to. This optimisation is used unless rclone is listing the remote recursively. Recursive lists are used for rclone ls and related commands or sync/copy/move with --fast-list. You can disable recursive lists with --disable ListR.

What do you think?

1 Like