Open
Description
The mirror()
method does not work correctly with custom iterators. This allows a user to easily mirror a directory based on certain criteria (for instance, only .jpg
files, or files larger than 6MB etc etc).
The third parameters of mirror()
allows us to specify a custom traversable instance which is used in two occasions: to iterate the files that needs to be copied, and to iterate files that needs to be deleted.
The issue is that when deleting files, it needs to traverse inside the TARGET directory, while when using the iterator for copying files, it will traverser inside the ORIGIN directory.
Using the same iterator is not possible in those cases.