Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create "filter" param in "Dir.transfer_to" #30

Closed
manoss96 opened this issue Apr 22, 2023 · 0 comments · Fixed by #32
Closed

Create "filter" param in "Dir.transfer_to" #30

manoss96 opened this issue Apr 22, 2023 · 0 comments · Fixed by #32
Assignees
Labels
enhancement New feature or request

Comments

@manoss96
Copy link
Owner

manoss96 commented Apr 22, 2023

Create a filter: Callable[[str], bool] parameter for Dir.transfer_to so that users can filter out files during the transfer based on their absolute path. For example:

from fluke.storage import LocalDir

dir_1 = LocalDir(path="dir1")
dir_2 = LocalDir(path="dir2")

dir_1.transfer_to(dst=dir_2, filter=lambda p: p.endswith('.txt'))

The specified filter above will cause only for TXT files to be transferred from dir_1 to dir_2.

@manoss96 manoss96 added the enhancement New feature or request label Apr 22, 2023
@manoss96 manoss96 self-assigned this Apr 22, 2023
@manoss96 manoss96 linked a pull request May 20, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant