public class FileUtil extends Object
| Constructor and Description |
|---|
FileUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
canExecute(File path) |
static void |
createSymLink(File path,
String target) |
static void |
delete(File path) |
static boolean |
exists(File path) |
static FS.Attributes |
getFileAttributesPosix(FS fs,
File path) |
static long |
getLength(File path) |
static boolean |
isDirectory(File path) |
static boolean |
isFile(File path) |
static boolean |
isHidden(File path) |
static boolean |
isSymlink(File path) |
static long |
lastModified(File path) |
static File |
normalize(File file) |
static String |
normalize(String name) |
static String |
readSymlink(File path) |
static void |
setHidden(File path,
boolean hidden) |
static void |
setLastModified(File path,
long time) |
public static String readSymlink(File path) throws IOException
path - IOExceptionpublic static void createSymLink(File path, String target) throws IOException
path - path of the symlink to be createdtarget - target of the symlink to be createdIOExceptionpublic static boolean isSymlink(File path)
path - true if the passed path is a symlinkpublic static long lastModified(File path) throws IOException
path - IOExceptionpublic static void setLastModified(File path, long time) throws IOException
path - time - IOExceptionpublic static boolean exists(File path)
path - true if the given path existspublic static boolean isHidden(File path) throws IOException
path - true if the given path is hiddenIOExceptionpublic static void setHidden(File path, boolean hidden) throws IOException
path - hidden - IOExceptionpublic static long getLength(File path) throws IOException
path - IOExceptionpublic static boolean isDirectory(File path)
path - true if the given file a directorypublic static boolean isFile(File path)
path - true if the given file is a filepublic static boolean canExecute(File path)
path - true if the given file can be executedpublic static void delete(File path) throws IOException
path - IOExceptionpublic static FS.Attributes getFileAttributesPosix(FS fs, File path)
fs - path - public static File normalize(File file)
file - File, otherwise the passed fileCopyright © 2015 Eclipse JGit Project. All rights reserved.