Make --files-from only read the objects specified and don't scan directories

Before this change using --files-from would scan all the directories
that the files could possibly be in causing rclone to do more work
that was necessary.

After this change, rclone constructs an in memory tree using the
--fast-list mechanism but from all of the files in the --files-from
list and without scanning any directories.

Any objects that are not found in the --files-from list are ignored
silently.

This mechanism is used for sync/copy/move (march) and all of the
listing commands ls/lsf/md5sum/etc (walk).
This commit is contained in:
Nick Craig-Wood
2018-10-19 17:41:14 +01:00
parent 9959c5f17f
commit c5ac96e9e7
7 changed files with 179 additions and 1 deletions

View File

@ -293,6 +293,10 @@ This reads a list of file names from the file passed in and **only**
these files are transferred. The **filtering rules are ignored**
completely if you use this option.
Rclone will not scan any directories if you use `--files-from` it will
just look at the files specified. Rclone will not error if any of the
files are missing from the source.
This option can be repeated to read from more than one file. These
are read in the order that they are placed on the command line.