def resolve_index_under_path(load_path, logical_name, mime_exts)
        dirname = File.join(load_path, logical_name)

        if self.directory?(dirname)
          candidates = self.find_matching_path_for_extensions(dirname, "index".freeze, mime_exts)
        else
          candidates = []
        end

        candidates.map! do |c|
          { filename: c[0],
            type: c[1],
            index_alias: compress_from_root(c[0].sub(/\/index(\.[^\/]+)$/, '\1')) }
        end

        return candidates, [ URIUtils.build_file_digest_uri(dirname) ]
      end
def resolve_index_under_path(load_path, logical_name, mime_exts)
        dirname = File.join(load_path, logical_name)

        if self.directory?(dirname)
          candidates = self.find_matching_path_for_extensions(dirname, "index".freeze, mime_exts)
        else
          candidates = []
        end

        candidates.map! do |c|
          { filename: c[0],
            type: c[1],
            index_alias: compress_from_root(c[0].sub(/\/index(\.[^\/]+)$/, '\1')) }
        end

        return candidates, [ URIUtils.build_file_digest_uri(dirname) ]
      end
Internal: Finds candidate index files in a given path

 load_path    - String. An absolute path to a directory
 logical_name - String. A filename without extension
                e.g. "application" or "coffee/foo"
 mime_exts    - Hash of file extensions and their mime types
                e.g. {".xml.builder"=>"application/xml+builder"}

 Looking in the given `load_path` this method will find all files under the `logical_name` directory
 that are named `index` and have a matching mime type in `mime_exts`.

 Returns Array. First element is an Array of hashes or empty, second is a String