pxar: impl .pxarexclude parsing and exclude matching

.pxarexclude files allow to exclude or include parts of a subtree by matching
with a glob pattern. The globs are used according to the matches of fnmatch.
In addition '**' can be used to match multiple directories within the path.

Order of the entries matter, as later ones win over previous ones.
As the .pxarexclude files can be placed at any node of the directory hirarchy,
this implies that matching child entries win over parent entries.
The only exception to this behaviour is, when a parent entry already fully
matched the path, thereby excluding the child entries which would match
otherwise.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
Christian Ebner
2019-06-21 18:15:01 +02:00
committed by Dietmar Maurer
parent 46bd880041
commit cd7dc87903
3 changed files with 353 additions and 21 deletions

View File

@ -62,4 +62,7 @@ pub use sequential_decoder::*;
mod decoder;
pub use decoder::*;
mod exclude_pattern;
pub use exclude_pattern::*;
mod helper;