Class WorkingDirectory
-
- All Implemented Interfaces:
-
java.lang.AutoCloseable
public final class WorkingDirectory implements AutoCloseable
Class that manage a temp local working directory.
-
-
Constructor Summary
Constructors Constructor Description WorkingDirectory()
Create new local temp working directory.
-
Method Summary
Modifier and Type Method Description URL
getDirectoryUrl()
String
getFileContent(String filename)
Get folder's file content. void
writeFiles(Map<String, Array<byte>> files)
Write multiple files inside the directory. String
getFileAbsolutePath(String filename)
void
close()
-
-
Method Detail
-
getDirectoryUrl
URL getDirectoryUrl()
- Returns:
Temp directory URL
-
getFileContent
String getFileContent(String filename)
Get folder's file content.
- Parameters:
filename
- File's name- Returns:
File's content
-
writeFiles
void writeFiles(Map<String, Array<byte>> files)
Write multiple files inside the directory.
- Parameters:
files
- A map with relative paths + files names as keys and file contents as values.
-
getFileAbsolutePath
String getFileAbsolutePath(String filename)
- Parameters:
filename
- File name- Returns:
Absolute path for given filename in this directory, even if it doesn't exists
-
close
void close()
-
-
-
-