Go to file
Gabriel Goller 4f065f7e73 match_list: updated matches(), to only retrieve file mode if necessary
Updated `matches()` function, which now takes the `GetFileMode` trait and returns a
Result. `GetFileMode` is a function that should return the `file_mode`. `matches()`
will go through the patterns and match by path only until it finds a pattern which
does not have `MatchFlag::ANY_FILE_TYPE`, in case it will call the
`get_file_mode`, which will return a `file_mode`. This will ensure that the
`get()` (which in our case executes `stat()`) will only be run once(at most),
every pattern will only be processed once and that the order of the patterns
will be respected. `GetFileMode` is also implemented for `Option<u32>` (so that
we can simply pass options of the `file_mode`) and `u32` (returning
`std::convert::Infallible`, so that we can pass a u32 mode directly).

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
2023-08-24 09:50:44 +02:00
.cargo add .cargo/config to use local repos 2020-06-03 13:30:33 +02:00
debian update d/control 2023-01-05 15:05:41 +01:00
src match_list: updated matches(), to only retrieve file mode if necessary 2023-08-24 09:50:44 +02:00
.gitignore initial import 2020-04-27 12:46:59 +02:00
Cargo.toml bump version to 0.1.3-1 2022-07-29 11:59:05 +02:00
Makefile fix d/control recreation 2020-08-25 12:48:20 +02:00