Constructor and Description |
---|
FileUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
deleteDirectory(Path dir) |
static void |
deleteQuietly(Path dir)
Deletes the directory recursively and quietly.
|
static String |
getBasedir()
Return the base directory
|
static String |
readFileToString(Path file,
Charset encoding) |
Path |
resolveNonAbsolute(Path parent,
String child)
This checks, if the given child is a absolute path.
|
static void |
unzip(Path zipFile,
Path destinationPath)
Unzips a file into a destination directory.
|
static void |
unzipFileEntry(ZipFile file,
ZipEntry entry,
Path destinationPath) |
static void |
writeStringToFile(Path file,
Charset encoding,
String value) |
public FileUtils()
public static void deleteQuietly(Path dir)
dir
- public static void deleteDirectory(Path dir) throws IOException
IOException
public static String readFileToString(Path file, Charset encoding)
public static void writeStringToFile(Path file, Charset encoding, String value)
public static String getBasedir()
public Path resolveNonAbsolute(Path parent, String child)
parent
- The parent directorychild
- The childpublic static void unzipFileEntry(ZipFile file, ZipEntry entry, Path destinationPath) throws IOException
IOException
public static void unzip(Path zipFile, Path destinationPath) throws IOException
zipFile
- the path to the zip filedestinationPath
- the destination path where the files should be extracted.IOException
- if an error occurs during extract.Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.