Find the first supporting resolver.

@param path
the name of the path of the resource
@return the first resolver supporting the path
962977
@Override
	public ResourceResolver getSupportingResolver(String path) {
		LOG.debug("Finding resolver for resource {}...", path);
		for (ResourceResolver resolver : resolvers) {
			if (resolver.supports(path)) {
				LOG.debug("{} can handle resource {}", resolver, path);
				return resolver;
			}
		}

		LOG.debug("No resolver can handle path '{}'", path);
		return null;
	}
853476
public ResourceHandle getParent(String resourceType, String path) {
        ResourceResolver resolver = getResolver();
        Resource resource;
        while (((resource = resolver.getResource(path)) == null || !resource.isResourceType(resourceType))
                && StringUtils.isNotBlank(path)) {
            int delimiter = path.lastIndexOf('/');
            if (delimiter >= 0) {
                path = path.substring(0, delimiter);
            } else {
                break;
            }
        }
        return ResourceHandle.use(resource);
    }
1016169
@Override
	public String getFilePath(String resourcePath) {
		return helper.getFilePath(resolver.getResourcePath(resourcePath));
	}
899539
public Optional<URL> resolve(String resourcePath) {
        for (Map.Entry<String, List<ResourceLoader>> entry : resourceMappings.entrySet()) {
            List<ResourceLoader> loaders = entry.getValue();
            String mapping = entry.getKey();
            if (!loaders.isEmpty() && pathMatcher.matches(mapping, resourcePath)) {
                String path = pathMatcher.extractPathWithinPattern(mapping, resourcePath);
                //A request to the root of the mapping
                if (StringUtils.isEmpty(path)) {
                    path = INDEX_PAGE;
                }
                if (path.startsWith("/")) {
                    path = path.substring(1);
                }
                for (ResourceLoader loader : loaders) {
                    Optional<URL> resource = loader.getResource(path);
                    if (resource.isPresent()) {
                        return resource;
                    } else {
                        if (path.indexOf('.') == -1) {
                            if (!path.endsWith("/")) {
                                path = path + "/";
                            }
                            path += INDEX_PAGE;
                            resource = loader.getResource(path);
                            if (resource.isPresent()) {
                                return resource;
                            }
                        }
                    }
                }
            }
        }

        return Optional.empty();
    }
889657
public Set<String> getResourceNames(String path) {

		Set<String> resourceNames = new HashSet<String>();
		String realPath = getRealResourcePath(path);
		if (isFileSystemPath(path, realPath)) { // The resource has been
												// remapped to a file system
												// path
			try {
				resourceNames = FileUtils.getResourceNames(new File(realPath));
			} catch (InvalidPathException e) {
				LOGGER.warn("The path " + path + " which has been mapped to " + realPath + " doesn't exist");
			}
		} else {
			resourceNames = super.getResourceNames(realPath);
		}

		return resourceNames;
	}
1220979
public String lookupRelativeNativePath(PathImpl path)
  {
    String thisNative = getNativePath();
    String pathNative = path.getNativePath();

    if (pathNative.startsWith(thisNative)) {
      int i = thisNative.length();

      while (i < pathNative.length()) {
        if (pathNative.charAt(i) != getFileSeparatorChar())
          break;

        i++;
      }

      return i == pathNative.length() ? "" : pathNative.substring(i);
    }
    else
      return pathNative;
  }
692547
public function resolve(Closure $originalResolver, string $path)
    {
        $isDeferred = $this->isDeferred($path);
        $resolver = $isDeferred
            ? $this->deferred[$path]
            : $originalResolver;

        if ($isDeferred) {
            $this->resolved[] = $path;

            unset($this->deferred[$path]);
        }

        return $resolver();
    }
70016
public String getUserResourceUri(final String path){
        if(StringUtils.isEmpty(path)) {
            throw new IllegalArgumentException("Path cannot be null");
        }
        return StringUtils.join(new String[] {getUserUri(), path}, "/");
    }
222786
public InputStream getResourceAsStream(String path) {

		path = path.replace('/', File.separatorChar);
		InputStream is = null;
		try {
			is = new FileInputStream(new File(baseDir, path));
		} catch (FileNotFoundException e) {
			logger.info("File for path : '" + path
					+ "' not found using baseDir '" + baseDir + "'");
		}

		return is;
	}
1051446
public ClassLoader resolve(Iterable<? extends File> classPath) {
        Set<File> classPathList = new LinkedHashSet<File>();
        for (File file : classPath) {
            classPathList.add(file);
        }
        return resolve(classPathList);
    }
934860
public Resource[] getResources(String path) throws IOException {
        if (hasContext()) {
            return context.getResources(path);
        }
        return getContext().getResources(getContextPath() + '/' + path);
    }
117853
public static String getResource(final String path) {
		final InputStream stream = getResourceStream(path);
		final BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
		final Stream<String> lines = reader.lines();
		return lines.collect(Collectors.joining("\n"));
	}
135944
@Override
    public Enumeration<URL> getResources(final String path) throws IOException {
        final ResourceList resourceList = scanResult.getResourcesWithPath(path);
        if (resourceList == null || resourceList.isEmpty()) {
            return super.getResources(path);
        } else {
            return new Enumeration<URL>() {
                /** The idx. */
                int idx;

                @Override
                public boolean hasMoreElements() {
                    return idx < resourceList.size();
                }

                @Override
                public URL nextElement() {
                    return resourceList.get(idx++).getURL();
                }
            };
        }
    }
538302
@Override
	public String getFilePath(String resourcePath) {
		String path = getResolver().getResourcePath(resourcePath);
		return rsBrowser.getFilePath(path);
	}
903656
public static String resolveHomeDirectory(String path) {
        if (path.startsWith("~")) {
            return path.replace("~", System.getProperty("user.home"));
        }
        return path;
    }
8999
public IVarDef find( String... path)
    {
    return
       path == null || path.length == 0
      ? this
      : getDescendant( path);
    }
1350408
public String fixPathInfo(String path)
    {
        if (path == null)
            return null;
        if (path.startsWith("/"))
            path = path.substring(1);   // Resources already start from root/baseURL
        if (baseURL == null)
            if (properties != null)
                if (this.getProperty(BASE_PATH) != null)
                    path = this.getProperty(BASE_PATH) + path;
        return path;
    }