public final class FileUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
delete(File file)
Deletes a file.
|
static String |
getBitBucket()
Return the bit bucket for the OS.
|
static File |
getDataDirectory(String configuredFilePath,
Class clazz)
Deprecated.
This method should no longer be used. See the implementation in dependency-check-cli/App.java to see
how the data directory should be set.
|
static String |
getFileExtension(String fileName)
Returns the (lowercase) file extension for a specified file.
|
static File |
getPathToJar(Class clazz)
Deprecated.
this should no longer be used.
|
static File |
getTempFile(String prefix,
String extension)
Generates a new temporary file name that is guaranteed to be unique.
|
public static String getFileExtension(String fileName)
fileName - the file name to retrieve the file extension from.public static boolean delete(File file)
file - the File to deletepublic static File getTempFile(String prefix, String extension) throws IOException
prefix - the prefix for the file name to generateextension - the extension of the generated file nameIOException - thrown if the temporary folder could not be created@Deprecated public static File getDataDirectory(String configuredFilePath, Class clazz) throws IOException
configuredFilePath - the configured relative or absolute pathclazz - the class to resolve the pathIOException - is thrown if the path could not be decoded@Deprecated public static File getPathToJar(Class clazz) throws UnsupportedEncodingException
clazz - the class to determine the parent directory ofUnsupportedEncodingException - thrown if UTF-8 is not supported.public static String getBitBucket()
Copyright© 2012-14 Jeremy Long. All Rights Reserved.