Print the computed watch list (limited output).
The printed list is capped to avoid overwhelming the terminal.
w%verbosity >= 2.files is not allocated.files: Computed list of watched file paths.w: Watcher options (controls whether printing is enabled).| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string_t), | intent(in), | allocatable | :: | files(:) | ||
| type(watch_opts_t), | intent(in) | :: | w |
subroutine print_file_list(files, w) type(string_t), allocatable, intent(in) :: files(:) type(watch_opts_t), intent(in) :: w integer :: i, cap character(len=:), allocatable :: pfx if (w%verbosity < 2) return if (.not. allocated(files)) return cap = 200 pfx = colorize("fpm-watch info:", color_fg='blue_intense', style='bold_on') write(output_unit,'(a)') & pfx // " watched files list (cap=200), n=" // & colorize(str(size(files)), color_fg='yellow_intense', style='bold_on') do i = 1, min(size(files), cap) write(output_unit,'(a)') pfx // " " // colorize(trim(files(i)%s), color_fg='white_intense') end do if (size(files) > cap) then write(output_unit,'(a)') & pfx // " ... (" // colorize(str(size(files)-cap), color_fg='yellow') // " more)" end if end subroutine print_file_list