Watch list filtering and path normalization.
Contains helpers to normalize paths and apply include/ignore globs to the computed set of watched files.
Key behaviors:
- Paths are normalized to use / separators.
- Leading ./ segments are removed for consistent matching.
- Build directory filtering is handled elsewhere (but helper exists here).
Identify paths that should be ignored due to being inside the build directory.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | path | |||
| character(len=*), | intent(in) | :: | build_dir |
Normalize a path to a consistent form for matching.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | path |
Check whether a string begins with a given prefix.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | s | |||
| character(len=*), | intent(in) | :: | prefix |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | p | |||
| character(len=*), | intent(in) | :: | frag |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | s | |||
| character(len=*), | intent(in) | :: | suffix |
Apply include/ignore rules to the watch list.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string_t), | intent(inout), | allocatable | :: | files(:) | ||
| type(string_t), | intent(in), | allocatable | :: | include(:) | ||
| type(string_t), | intent(in), | allocatable | :: | ignore(:) | ||
| integer(kind=int64), | intent(inout), | optional, | allocatable | :: | masks(:) |