public final class FileUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
close(Closeable closeable)
Close the given
Closeable instance, ignoring nulls, and logging
any thrown IOException. |
static File |
createTempDirectory(File base)
Creates a unique temporary directory in the given directory.
|
static boolean |
delete(File file)
Deletes a file.
|
static String |
getBitBucket()
Return the bit bucket for the OS.
|
static String |
getFileExtension(String fileName)
Returns the (lowercase) file extension for a specified file.
|
static InputStream |
getResourceAsStream(String resource)
Gets the
InputStream for this resource. |
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 createTempDirectory(File base) throws IOException
base - the base directory to create a temporary directory withinIOException - thrown when a directory cannot be created within the
base directorypublic static String getBitBucket()
public static void close(Closeable closeable)
Closeable instance, ignoring nulls, and logging
any thrown IOException.closeable - to be closedpublic static InputStream getResourceAsStream(String resource)
InputStream for this resource.resource - pathCopyright © 2012–2019 OWASP. All rights reserved.