Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Filesystem] mirror() does not work correctly with custom iterators #14068

Open
@jaytaph

Description

@jaytaph

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions