public class ApexFileHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
LOGGER |
| Modifier | Constructor and Description |
|---|---|
protected |
ApexFileHelper() |
| Modifier and Type | Method and Description |
|---|---|
static String |
cleanWhitespaces(String mdx) |
static Path |
createTempPath(String prefix,
String suffix,
boolean deleteOnExit)
Enable creating a tmp path to a not-existing file.
|
static void |
expandJarToDisk(Path jarPath,
Path targetPath) |
static Optional<Path> |
getHoldingJarPath(URI resource) |
static Path |
getResourceAsPath(org.springframework.core.io.Resource resource) |
static URL |
getResourceURL(String path) |
static PathMatcher |
makePathMatcher(String globPathMatcher,
boolean matchAnySubdirectory) |
static Path |
resolveToPath(org.springframework.core.io.ResourceLoader resourceLoader,
String pathToFileOrFolder)
It may be unclear how a path should be provided: a relative path './folder/file', an absolute file '/root/file'
or some Spring syntax ('file:/root/file' or 'classpath:folder/file').
|
public static Path getResourceAsPath(org.springframework.core.io.Resource resource)
resource - a resource to be made available as a Pathpublic static URL getResourceURL(String path)
path - a path like '/folder/file' in folder in a folder in the classpathpublic static Path createTempPath(String prefix, String suffix, boolean deleteOnExit) throws IOException
IOException@Beta public static void expandJarToDisk(Path jarPath, Path targetPath) throws IOException
IOExceptionpublic static Optional<Path> getHoldingJarPath(URI resource) throws IOException
IOExceptionpublic static Path resolveToPath(org.springframework.core.io.ResourceLoader resourceLoader, String pathToFileOrFolder)
resourceLoader - pathToFileOrFolder - public static PathMatcher makePathMatcher(String globPathMatcher, boolean matchAnySubdirectory)
Copyright © 2014–2017 Pivotal Software, Inc.. All rights reserved.