watch_filter Module

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).


Uses

  • module~~watch_filter~~UsesGraph module~watch_filter watch_filter fpm_filesystem fpm_filesystem module~watch_filter->fpm_filesystem fpm_strings fpm_strings module~watch_filter->fpm_strings iso_fortran_env iso_fortran_env module~watch_filter->iso_fortran_env

Used by

  • module~~watch_filter~~UsedByGraph module~watch_filter watch_filter module~watch_fpm_graph watch_fpm_graph module~watch_fpm_graph->module~watch_filter module~watch_engine watch_engine module~watch_engine->module~watch_fpm_graph

Functions

public pure function is_ignored_path(path, build_dir) result(ignored)

Identify paths that should be ignored due to being inside the build directory.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: path
character(len=*), intent(in) :: build_dir

Return Value logical

public pure function normalize_path(path) result(p)

Normalize a path to a consistent form for matching.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: path

Return Value character(len=:), allocatable

public pure function starts_with(s, prefix) result(ok)

Check whether a string begins with a given prefix.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: s
character(len=*), intent(in) :: prefix

Return Value logical

private pure function contains_path_fragment(p, frag) result(ok)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: p
character(len=*), intent(in) :: frag

Return Value logical

private pure function ends_with(s, suffix) result(ok)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: s
character(len=*), intent(in) :: suffix

Return Value logical


Subroutines

public subroutine filter_watch_files(files, include, ignore, masks)

Apply include/ignore rules to the watch list.

Read more…

Arguments

Type IntentOptional 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(:)