public interface PathUtilitiesProvider
ServiceLoader which means the
implementation class must be named in a
META-INF/services/org.graalvm.compiler.debug.PathUtilitiesProvider service description
file accessible on the class path. Note that a PathUtilitiesProvider implementation must
work in the context of building a native image as well as in the context of the resulting native
image. Delegating to StandardPathUtilitiesProvider is the recommended way to work in the
context of building a native image.| Modifier and Type | Method and Description |
|---|---|
String |
archiveAndDelete(String directory,
String zip)
Zips and deletes
directory if it exists. |
String |
createDirectories(String path) |
String |
createFile(String path) |
void |
deleteFile(String path) |
boolean |
exists(String path) |
String |
getAbsolutePath(String path) |
String |
getParent(String path) |
String |
getPath(String first,
String... more) |
boolean |
isDirectory(String path,
boolean followLinks) |
WritableByteChannel |
openFileChannel(String path,
OpenOption... options) |
InputStream |
openInputStream(String path) |
OutputStream |
openOutputStream(String path,
boolean append) |
String |
sanitizeFileName(String name)
Gets a value based on
name that can be passed to PathUtilitiesProvider.getPath(String, String...)
without causing an InvalidPathException. |
String sanitizeFileName(String name)
name that can be passed to PathUtilitiesProvider.getPath(String, String...)
without causing an InvalidPathException.name with all characters invalid for the current file system replaced by
'_'String archiveAndDelete(String directory, String zip) throws IOException
directory if it exists.zip - path of the zip file to createIOException - if something goes wrongString getPath(String first, String... more)
Paths.get(String, String...)String getAbsolutePath(String path)
File.getAbsolutePath()OutputStream openOutputStream(String path, boolean append) throws IOException
IOExceptionFileOutputStream.FileOutputStream(String, boolean)boolean exists(String path)
File.exists()String createDirectories(String path) throws IOException
String createFile(String path) throws IOException
boolean isDirectory(String path, boolean followLinks)
void deleteFile(String path) throws IOException
IOExceptionFiles.delete(Path)String getParent(String path)
File.getParent()WritableByteChannel openFileChannel(String path, OpenOption... options) throws IOException
IOExceptionFileChannel.open(Path, OpenOption...)InputStream openInputStream(String path) throws IOException
IOExceptionFileInputStream.FileInputStream(String)