module Sprockets::Resolve
def dirname_matches(dirname, basename)
def dirname_matches(dirname, basename) candidates = [] entries = self.entries(dirname) entries.each do |entry| next unless File.basename(entry).start_with?(basename) name, type, _, _ = parse_path_extnames(entry) if basename == name candidates << [File.join(dirname, entry), type] end end candidates end