|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.sparql.benchmarking.util.FileUtils
public class FileUtils
Helper class with utility methods related to files
| Method Summary | |
|---|---|
static boolean |
checkFile(File f,
boolean allowOverwrite)
Checks whether a given path is a file, does not exist (unless allowOverwrite is true) and is writable |
static boolean |
checkFile(String filename,
boolean allowOverwrite)
Checks whether a given path is a file, does not exist (unless allowOverwrite is true) and is writable |
static String |
getExtension(File file,
boolean includeMultipleExtensions,
boolean includeLeadingDot)
Gets the extension for a given file |
static String |
getExtension(String path,
boolean includeMultipleExtensions,
boolean includeLeadingDot)
Gets the extension for a given path |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean checkFile(String filename,
boolean allowOverwrite)
allowOverwrite is true) and is writable
filename - Filename to checkallowOverwrite - Whether overwriting of existing files is allowed
public static boolean checkFile(File f,
boolean allowOverwrite)
allowOverwrite is true) and is writable
f - File to checkallowOverwrite - Whether overwriting of existing files is allowed
public static String getExtension(String path,
boolean includeMultipleExtensions,
boolean includeLeadingDot)
throws IOException
path - PathincludeMultipleExtensions - Whether multiple extensions are returned e.g. .txt.gzincludeLeadingDot - Whether the leading . on the extension is returned
IOException - Thrown if the path is not a file
public static String getExtension(File file,
boolean includeMultipleExtensions,
boolean includeLeadingDot)
throws IOException
file - FileincludeMultipleExtensions - Whether multiple extensions are returned e.g. .txt.gzincludeLeadingDot - Whether the leading . on the extension is returned
IOException - Thrown if the filename
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||