Skip to content

Exclude and include directory #32

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jeromeroucou
Copy link

@jeromeroucou jeromeroucou commented May 7, 2025

This draft PR is a proof of concept to address issue #31
This PR address issue #31

Two parameters have been added:

  • -exdir to exclude a folder and its subfolders by specifying its absolute path.
  • -incdir to include a folder if a parent folder is excluded, specifying its absolute path.

With this POC PR done, some questions are still on:

  • The -ex parameter already exists, allowing files to be excluded based on a regular expression. Will these two new parameters compete with it?
  • Would a regular expression also be interesting?
  • Also, would anyone be available to work on this improvement?

@qqmyers
Copy link
Member

qqmyers commented May 7, 2025

Seems like a reasonable addition. W.r.t. the -ex param - looks like a file will be excluded if it is in an excluded dir or by the regex, which seems reasonable to me. Given that I think the code allows multiple include/exclude dirs, I would hope that regexes wouldn't be needed for dir matching.
Assuming we go ahead with this PR (I see it's draft now), we'll want to update the wiki page with the new optional params

@jeromeroucou
Copy link
Author

For wiki page, I suggest the following documentation:

-exdir=<expath> : excludes files in the specified folder. It's possible to indicate either an absolute or relative path. In the second case, it must be located relative to the execution folder, which may be different from the folder containing the files to be uploaded. Multiple folders can be excluded by repeating the flag several times.

-indir=<inpath> : includes files present in the subfolder whose ancestor is an excluded folder. This parameter should therefore be used in conjunction with -exdir. It's possible to exclude several folders by repeating the flag several times. In this way, it's possible to upload only the files in certain sub-folders.

It's a proposition that can be rewritten.

@jeromeroucou jeromeroucou changed the title POC: exclude and include directory Exclude and include directory May 21, 2025
@jeromeroucou jeromeroucou marked this pull request as ready for review May 21, 2025 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants