class ActionView::FileSystemResolver

def template_glob(glob)

Experimental RBS support (using type sampling data from the type_fusion project).

def template_glob: (String glob) -> (Array[String] | Array[])

This signature was generated using 3 samples from 1 application.

Safe glob within @path
def template_glob(glob)
  query = File.join(escape_entry(@path), glob)
  path_with_slash = File.join(@path, "")
  Dir.glob(query).filter_map do |filename|
    filename = File.expand_path(filename)
    next if File.directory?(filename)
    next unless filename.start_with?(path_with_slash)
    filename
  end
end