Package org.codehaus.plexus.util
Class NioFiles
- java.lang.Object
-
- org.codehaus.plexus.util.NioFiles
-
public class NioFiles extends Object
Encapsulates use of java7 features, exposing mostly backward compatible types
-
-
Constructor Summary
Constructors Constructor Description NioFiles()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
chmod(File file, int mode)
static File
copy(File source, File target)
static File
createSymbolicLink(File symlink, File target)
static boolean
deleteIfExists(File file)
static long
getLastModified(File file)
static boolean
isSymbolicLink(File file)
static File
readSymbolicLink(File symlink)
Reads the target of the symbolic link
-
-
-
Method Detail
-
isSymbolicLink
public static boolean isSymbolicLink(File file)
-
chmod
public static void chmod(File file, int mode) throws IOException
- Throws:
IOException
-
getLastModified
public static long getLastModified(File file) throws IOException
- Throws:
IOException
-
readSymbolicLink
public static File readSymbolicLink(File symlink) throws IOException
Reads the target of the symbolic link- Parameters:
symlink
- A file that is a symlink- Returns:
- A file that is the target of the symlink
- Throws:
IOException
- io issue
-
createSymbolicLink
public static File createSymbolicLink(File symlink, File target) throws IOException
- Throws:
IOException
-
deleteIfExists
public static boolean deleteIfExists(File file) throws IOException
- Throws:
IOException
-
copy
public static File copy(File source, File target) throws IOException
- Throws:
IOException
-
-