public class NioFiles
extends java.lang.Object
Constructor and Description |
---|
NioFiles() |
Modifier and Type | Method and Description |
---|---|
static void |
chmod(java.io.File file,
int mode) |
static java.io.File |
copy(java.io.File source,
java.io.File target) |
static java.io.File |
createSymbolicLink(java.io.File symlink,
java.io.File target) |
static boolean |
deleteIfExists(java.io.File file) |
static long |
getLastModified(java.io.File file) |
private static java.util.Set<java.nio.file.attribute.PosixFilePermission> |
getPermissions(int mode) |
static boolean |
isSymbolicLink(java.io.File file) |
static java.io.File |
readSymbolicLink(java.io.File symlink)
Reads the target of the symbolic link
|
public static boolean isSymbolicLink(java.io.File file)
public static void chmod(java.io.File file, int mode) throws java.io.IOException
java.io.IOException
private static java.util.Set<java.nio.file.attribute.PosixFilePermission> getPermissions(int mode)
public static long getLastModified(java.io.File file) throws java.io.IOException
java.io.IOException
public static java.io.File readSymbolicLink(java.io.File symlink) throws java.io.IOException
symlink
- A file that is a symlinkjava.io.IOException
public static java.io.File createSymbolicLink(java.io.File symlink, java.io.File target) throws java.io.IOException
java.io.IOException
public static boolean deleteIfExists(java.io.File file) throws java.io.IOException
java.io.IOException
public static java.io.File copy(java.io.File source, java.io.File target) throws java.io.IOException
java.io.IOException