Exclude directory if some relative file is present in the filesystem
Open
patterns
question
- Dominant language
- Python
- Stars
- 13.7k
- Forks
- 875
- Avg merge
- 11h 15m
- Merged PRs (30d)
- 192
Description
Sometimes it is reasonable to exclude directory, but only if some file is present.
### Example
Rust projects are defined by `Cargo.toml` file. All build files are placed to `target` directory in the project structure.
```
(project root)
|- Cargo.toml
|- src (contains source files)
| |- ...
|- target (contains build files generated by Rust tooling)
| |- ...
|- ...
```
We would like to exclude `target` directory only if the directory containing `target` directory contains also `Cargo.toml`.
In ZSH syntax it would be: `**/target(e:'[[ -f $REPLY/../Cargo.toml ]]':)`
Is it possible in Borg now?
Contributor guide
Assessment
This issue has not been assessed yet.