Static Public Member Functions | |
static String | getAbsoluteFilePath (String root, String path) |
static String | readTextFile (File file) throws FileNotFoundException, IOException |
static String | readTextFile (String filename) throws FileNotFoundException, IOException |
static boolean | Unzip (String zipFile, String outputDirectory) |
File Utils for reading text files and unzip.
Definition at line 28 of file FileUtil.java.
static String edu.tum.cs.ias.knowrob.utils.FileUtil.getAbsoluteFilePath | ( | String | root, |
String | path | ||
) | [inline, static] |
Convert a file path into a File object with an absolute path relative to a passed in root. If path is absolute then a file object constructed from new File(path) is returned, otherwise a file object is returned from new File(root, path) if root is not null, otherwise null is returned.
root | root file path |
path | relative file path |
Definition at line 42 of file FileUtil.java.
static String edu.tum.cs.ias.knowrob.utils.FileUtil.readTextFile | ( | File | file | ) | throws FileNotFoundException, IOException [inline, static] |
Read a text file and return it as a String.
file | File to read |
FileNotFoundException | If file not found or invalid path |
IOException | if there was an error reading the file |
Definition at line 64 of file FileUtil.java.
static String edu.tum.cs.ias.knowrob.utils.FileUtil.readTextFile | ( | String | filename | ) | throws FileNotFoundException, IOException [inline, static] |
Read a text file and return it as a String.
filename | Filename as String. File must exist otherwise a FileNotFound exception will be thrown. |
FileNotFoundException | If file not found or invalid path |
IOException | if there was an error reading the file |
Definition at line 85 of file FileUtil.java.
static boolean edu.tum.cs.ias.knowrob.utils.FileUtil.Unzip | ( | String | zipFile, |
String | outputDirectory | ||
) | [inline, static] |
Unzip a zipped file (eg. kmz, zip) into given directory
zipFile | zipped file to unzip |
outputDirectory | destination directory for unzipped content |
Definition at line 98 of file FileUtil.java.