public final class Files
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static Actions.Action1<java.io.File> |
appendLineToFile(java.lang.String _text)
Action that appends some text data to a file.
|
static Actions.Action1<java.io.File> |
appendToFile(java.lang.String _text)
Action that appends some text data to a file.
|
static Actions.Action1<java.io.File> |
copyFile(java.lang.String _destFilePath)
Action that copies a file from an absolute file path to another
|
static Actions.Action1<java.io.File> |
deleteDirectory()
Action that deletes a directory from an absolute file path.
|
static Actions.Action1<java.io.File> |
deleteDirectoryRecursive()
Action that deletes a directory tree from an absolute file path.
|
static Actions.Action1<java.io.File> |
deleteFile()
Action that deletes a file from an absolute file path.
|
static Functions.Function1<java.io.File,java.lang.String> |
getAbsolutePath()
Returns the absolute path of the file
|
static Functions.Function1<java.io.File,java.lang.String> |
getExtension(java.io.File file)
Returns the extension of the file
|
static Functions.Function1<java.lang.String,java.io.File> |
getFile()
Returns a File for a given path
|
static Functions.Function1<java.io.File,java.lang.String> |
getName()
Returns the name of the file
|
static Functions.Function1<java.io.File,java.io.File> |
getParent()
Returns the parent of the file
|
static Actions.Action1<java.io.File> |
moveFile(java.lang.String _destFilePath)
Action that moves a file from an absolute file path to another
|
static Actions.Action1<java.io.File> |
tryCopyFile(java.lang.String _destFilePath)
Action that copies a file from an absolute file path to another.
|
static Actions.Action1<java.io.File> |
tryDeleteDirectory()
Action that deletes a directory from an absolute file path.
|
static Actions.Action1<java.io.File> |
tryDeleteDirectoryRecursive()
Action that deletes a directory tree from an absolute file path.
|
static Actions.Action1<java.io.File> |
tryDeleteFile()
Action that deletes a file from an absolute file path.
|
static Actions.Action1<java.io.File> |
tryMoveFile(java.lang.String _destFilePath)
Action that moves a file from one absolute file path to another.
|
public static Actions.Action1<java.io.File> appendToFile(java.lang.String _text)
java.lang.NullPointerException
- An argument is nulljava.lang.IllegalArgumentException
- An argument is out of rangejava.io.IOException
- An I/O error occursjava.io.FileNotFoundException
- The file specified is a directory, or it does not exist and cannot be created, or cannot be appended to.java.lang.SecurityException
- Access to filesystem is denied by a SecurityManagerpublic static Actions.Action1<java.io.File> appendLineToFile(java.lang.String _text)
java.lang.NullPointerException
- An argument is nulljava.lang.IllegalArgumentException
- An argument is out of rangejava.io.IOException
- An I/O error occursjava.io.FileNotFoundException
- The file specified is a directory, or it does not exist and cannot be created, or cannot be appended to.java.lang.SecurityException
- Access to filesystem is denied by a SecurityManagerpublic static Actions.Action1<java.io.File> copyFile(java.lang.String _destFilePath)
java.lang.NullPointerException
- An argument is nulljava.io.IOException
- An I/O error occursjava.io.FileNotFoundException
- The file specified is a directory, it does not exist or cannot be read/created.java.lang.SecurityException
- Access to filesystem is denied by a SecurityManagerpublic static Actions.Action1<java.io.File> deleteFile()
java.lang.NullPointerException
- An argument is nulljava.io.IOException
- An I/O error occursjava.io.FileNotFoundException
- The file was a directoryjava.lang.SecurityException
- Access to filesystem is denied by a SecurityManagerpublic static Actions.Action1<java.io.File> deleteDirectory()
java.lang.NullPointerException
- An argument is nulljava.io.IOException
- An I/O error occursjava.io.FileNotFoundException
- The file was not a directoryjava.lang.SecurityException
- Access to filesystem is denied by a SecurityManagerpublic static Actions.Action1<java.io.File> deleteDirectoryRecursive()
java.lang.NullPointerException
- An argument is nulljava.io.IOException
- An I/O error occursjava.io.FileNotFoundException
- The file was not a directoryjava.lang.SecurityException
- Access to filesystem is denied by a SecurityManagerpublic static Functions.Function1<java.lang.String,java.io.File> getFile()
java.lang.NullPointerException
- An argument is nulljava.lang.SecurityException
- If a required system property value cannot be accessedpublic static Functions.Function1<java.io.File,java.lang.String> getAbsolutePath()
java.lang.NullPointerException
- An argument is nulljava.lang.SecurityException
- If a required system property value cannot be accessedpublic static Functions.Function1<java.io.File,java.lang.String> getExtension(java.io.File file)
java.lang.NullPointerException
- An argument is nullpublic static Functions.Function1<java.io.File,java.lang.String> getName()
java.lang.NullPointerException
- An argument is nullpublic static Functions.Function1<java.io.File,java.io.File> getParent()
java.lang.NullPointerException
- An argument is nulljava.lang.SecurityException
- If a required system property value cannot be accessedpublic static Actions.Action1<java.io.File> moveFile(java.lang.String _destFilePath)
java.lang.NullPointerException
- An argument is nulljava.io.IOException
- An I/O error occursjava.io.FileNotFoundException
- The file specified is a directory, it does not exist or cannot be read/created.java.lang.SecurityException
- Access to filesystem is denied by a SecurityManagerpublic static Actions.Action1<java.io.File> tryMoveFile(java.lang.String _destFilePath)
public static Actions.Action1<java.io.File> tryCopyFile(java.lang.String _destFilePath)
public static Actions.Action1<java.io.File> tryDeleteFile()
public static Actions.Action1<java.io.File> tryDeleteDirectory()
public static Actions.Action1<java.io.File> tryDeleteDirectoryRecursive()