def resolve_main_under_path(load_path, logical_name, mime_exts)
        dirname    = File.dirname(File.join(load_path, logical_name))
        candidates = self.find_matching_path_for_extensions(dirname, File.basename(logical_name), mime_exts)
        candidates.map! do |c|
          { filename: c[0], type: c[1] }
        end
        return candidates, [ URIUtils.build_file_digest_uri(dirname) ]
      end
def resolve_main_under_path(load_path, logical_name, mime_exts)
        dirname    = File.dirname(File.join(load_path, logical_name))
        candidates = self.find_matching_path_for_extensions(dirname, File.basename(logical_name), mime_exts)
        candidates.map! do |c|
          { filename: c[0], type: c[1] }
        end
        return candidates, [ URIUtils.build_file_digest_uri(dirname) ]
      end
Internal: Finds candidate files on 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"}

 Finds files that match a given `logical_name` with an acceptable
 mime type that is included in `mime_exts` on the `load_path`.

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