Builds the File path mapping

@param path the resource path
@param rsHandler the resource reader handler

@return the file path mapping
546699
public static FilePathMapping buildFilePathMapping(String path,
			ResourceReaderHandler rsHandler) {

		return buildFilePathMapping(null, path, rsHandler);
	}
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();
    }
129426
@Override
    public Promise<FileSystemProps> fsProps(String path) {
        return adapter.toPromise(handler -> vertx.fileSystem().fsProps(path, handler));
    }
1016169
@Override
	public String getFilePath(String resourcePath) {
		return helper.getFilePath(resolver.getResourcePath(resourcePath));
	}
1137911
public static DocumentPath from(String path) {
    if (path.equals(ROOT_PATH)) {
      return ROOT;
    }
    return new DocumentPath(Arrays.asList(path.split(PATH_SEPARATOR)));
  }
1119946
public ResolvedRequest withPath( String path ) {
        assert repositoryName != null;
        assert workspaceName != null;
        return new ResolvedRequest(request, repositoryName, workspaceName, path);
    }
466186
private void addBinaryResourcePath(BinaryResourcesHandler binRsHandler, String resourcePath) {

		try {
			String resultPath = CheckSumUtils.getCacheBustedUrl(resourcePath, rsReaderHandler, jawrConfig);
			binRsHandler.addMapping(resourcePath, resultPath);
			bundleMapping.put(resourcePath, resultPath);
		} catch (IOException e) {
			LOGGER.error("An exception occurs while defining the mapping for the file : " + resourcePath, e);
		} catch (ResourceNotFoundException e) {
			LOGGER.error("Impossible to define the checksum for the resource '" + resourcePath
					+ "'. Unable to retrieve the content of the file.");
		}
	}
1143588
@Override
    public InputStream getResourceAsStream( String path )
    {
        Object in = null;
        if ( null != baseLoader )
            // classloader wants no leading slash
            in = baseLoader.getResourceAsStream( path.substring(1) );
        if ( null == in )
            return super.getResourceAsStream( path );
        return (InputStream) in;
    }
664824
@Override
	public Reader generateResource(String path, GeneratorContext context) {

		Reader rd = null;
		try {
			List<Class<?>> excluded = new ArrayList<>();
			excluded.add(ICoffeeScriptGenerator.class);
			JoinableResourceBundle bundle = context.getBundle();
			rd = rsHandler.getResource(bundle, path, false, excluded);
			StringWriter swr = new StringWriter();
			IOUtils.copy(rd, swr);

			String result = compile(path, swr.toString());
			rd = new StringReader(result);

			// Update linked resource map
			FilePathMapping fMapping = FilePathMappingUtils.buildFilePathMapping(path, rsHandler);
			if (fMapping != null) {
				addLinkedResources(path, context, fMapping);
			}

		} catch (ResourceNotFoundException | IOException e) {
			throw new BundlingProcessException(e);
		}

		return rd;
	}
996360
protected void addFilePathMapping(BundlePathMapping bundlePathMapping, String pathMapping) {
		long timestamp = 0;
		String filePath = resourceReaderHandler.getFilePath(pathMapping);
		if (filePath != null) {
			timestamp = resourceReaderHandler.getLastModified(filePath);
			List<FilePathMapping> filePathMappings = bundlePathMapping.getFilePathMappings();
			boolean found = false;
			for (FilePathMapping filePathMapping : filePathMappings) {
				if (filePathMapping.getPath().equals(filePath)) {
					found = true;
					break;
				}
			}
			if (!found) {
				filePathMappings.add(new FilePathMapping(bundle, filePath, timestamp));
			}
		}

	}
1093136
public InputStream getResourceAsStream( String path ) {
        Object in = null;
        if ( externalClassLoader != null )
            // classloader wants no leading slash
            in = externalClassLoader.getResourceAsStream( path.substring(1) );
        if ( in == null )
            return Interpreter.class.getResourceAsStream( path );

        return (InputStream) in;
    }
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;
	}
538302
@Override
	public String getFilePath(String resourcePath) {
		String path = getResolver().getResourcePath(resourcePath);
		return rsBrowser.getFilePath(path);
	}
1105399
private File getFileFromPath(final String path) {
        File result = (path != null) ? new File(path) : null;
        // AS7-1752 see if a non-existent relative path exists relative to the home dir
        if (result != null && homeDir != null && !result.exists() && !result.isAbsolute()) {
            File relative = new File(homeDir, path);
            if (relative.exists()) {
                result = relative;
            }
        }
        return result;
    }
442856
public static HttpFileBuilder ofResource(String path) {
        requireNonNull(path, "path");
        return ofResource(HttpFile.class.getClassLoader(), path);
    }
633739
public Javalin patch(@NotNull String path, @NotNull Handler handler, @NotNull Set<Role> permittedRoles) {
        return addHandler(HandlerType.PATCH, path, handler, permittedRoles);
    }
729967
@Override
	public Reader getResourceAsReader(String resourceName) throws IOException {

		try {
			return rsHandler.getResource(null, resourceName, true);
		} catch (ResourceNotFoundException e) {
			throw new IOException("The resource '" + resourceName + "' was not found.");
		}
	}