Common utility classes to deal with Files and IO in general.
| Type Params | Return Type | Name and description |
|---|---|---|
|
static java.lang.Object |
close(java.io.Closeable closeable)Unconditionally close a Closeable, any exceptions will be ignored. |
|
static java.lang.Object |
ensureDirExists(java.io.File targetDir)Check that the specified directory exists, if not try to create it. |
|
static boolean |
isIgnoreFile(java.io.File file) |
|
static java.lang.Object |
writeLines(java.io.File file, java.lang.Iterable<java.lang.String> lines)Write the list of Strings to the file, using UTF8 encoding. |
|
static java.lang.Object |
writeLines(java.io.Writer output, java.lang.Iterable<java.lang.String> lines)Write the list of Strings to the writer. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Unconditionally close a Closeable, any exceptions will be ignored.
Check that the specified directory exists, if not try to create it.
Write the list of Strings to the file, using UTF8 encoding. One by line. Ensure the directory for the file exists
Write the list of Strings to the writer. One by line.