Main watcher state and methods.
watcher_t owns:
- The effective configuration (cfg)
- Feature plugins (fm)
- Watch list (files) plus per-file target masks (file_mask)
- Fingerprinting buffers for change detection (fp_prev, fp_now)
- The current manifest key used to detect "rebuild needed" events (man_prev)
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(watch_config_t), | public | :: | cfg | ||||
| integer, | public, | allocatable | :: | changed_idx(:) | |||
| integer(kind=int64), | public, | allocatable | :: | file_mask(:) | |||
| type(string_t), | public, | allocatable | :: | files(:) | |||
| type(feature_manager_t), | public | :: | fm | ||||
| integer(kind=int64), | public, | allocatable | :: | fp_now(:) | |||
| integer(kind=int64), | public, | allocatable | :: | fp_prev(:) | |||
| integer(kind=int64), | public | :: | man_prev | = | 0_int64 | ||
| type(root_info_t), | public, | allocatable | :: | roots(:) |
Initialize a watcher instance from configuration.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(watcher_t), | intent(inout) | :: | self | |||
| type(watch_config_t), | intent(in) | :: | cfg |
Run the main watch loop until termination.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(watcher_t), | intent(inout) | :: | self |
type watcher_t type(watch_config_t) :: cfg type(feature_manager_t) :: fm type(string_t), allocatable :: files(:) integer(int64), allocatable :: file_mask(:) type(root_info_t), allocatable :: roots(:) integer(int64), allocatable :: fp_prev(:) integer(int64), allocatable :: fp_now(:) integer, allocatable :: changed_idx(:) integer(int64) :: man_prev = 0_int64 contains procedure :: init => watcher_init procedure :: run => watcher_run end type watcher_t