public class NioFile extends IoFile implements File
| Modifier | Constructor and Description |
|---|---|
protected |
NioFile(File ioFile) |
protected |
NioFile(File parent,
String child) |
protected |
NioFile(String pathname) |
protected |
NioFile(String parent,
String child) |
protected |
NioFile(URI uri) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(File otherFile) |
void |
copyToCopyAttributes(File toFile)
Copies a file, a symlink (depends on environment/implementation) or a directory (non-recursive).
|
void |
createSymbolicLink(String targetPath) |
boolean |
existsNoFollow() |
File |
getAbsoluteFile() |
File |
getCanonicalFile() |
long |
getLastModifiedNoFollow() |
File |
getParentFile() |
boolean |
isDirectoryFollowSymLinks() |
boolean |
isDirectoryNoFollowSymLinks() |
boolean |
isRegularFileFollowLinks() |
boolean |
isRegularFileNoFollowLinks() |
boolean |
isSymbolicLink() |
long |
lastModified() |
File[] |
listFiles() |
File[] |
listFiles(FileFilter fileFilter) |
File[] |
listFiles(FilenameFilter fileFilter) |
void |
move(File toFile)
This is platform independent, in contrast to
File.renameTo(File) respectively File.renameTo(java.io.File). |
String |
readSymbolicLinkToPathString()
Convenience method for the often called chain:
java.io.File --> java.nio.Path --> Files.readSymbolicLink --> IOUtil.toPathString
Without symlinks, this method would not be needed.
|
String |
relativize(File target) |
boolean |
renameTo(File dest)
This is platform dependent (e.g.
|
boolean |
setLastModified(long lastModified) |
boolean |
setLastModifiedNoFollow(long lastModified) |
canExecute, canRead, canWrite, createFile, createInputStream, createNewFile, createOutputStream, createOutputStream, createRandomAccessFile, delete, deleteOnExit, deleteRecursively, equals, exists, getAbsolutePath, getCanonicalPath, getFreeSpace, getIoFile, getName, getPath, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, length, list, list, listFiles, mkdir, mkdirs, setExecutable, setExecutable, setReadable, setReadable, setWritable, setWritable, toString, toURIclone, finalize, getClass, notify, notifyAll, wait, wait, waitcanExecute, canRead, canWrite, createFile, createInputStream, createNewFile, createOutputStream, createOutputStream, createRandomAccessFile, delete, deleteOnExit, deleteRecursively, exists, getAbsolutePath, getCanonicalPath, getFreeSpace, getIoFile, getName, getPath, getUsableSpace, isAbsolute, isDirectory, isFile, length, list, list, listFiles, mkdir, mkdirs, setExecutable, setExecutable, setReadable, setReadable, setWritable, setWritable, toURIpublic File getParentFile()
getParentFile in interface FilegetParentFile in class IoFilepublic File[] listFiles(FileFilter fileFilter)
public File[] listFiles(FilenameFilter fileFilter)
public File getAbsoluteFile()
getAbsoluteFile in interface FilegetAbsoluteFile in class IoFilepublic boolean existsNoFollow()
existsNoFollow in interface FileexistsNoFollow in class IoFilepublic File getCanonicalFile() throws IOException
getCanonicalFile in interface FilegetCanonicalFile in class IoFileIOExceptionpublic boolean isRegularFileNoFollowLinks()
isRegularFileNoFollowLinks in interface FileisRegularFileNoFollowLinks in class IoFilepublic boolean isRegularFileFollowLinks()
isRegularFileFollowLinks in interface FileisRegularFileFollowLinks in class IoFilepublic boolean isDirectoryNoFollowSymLinks()
isDirectoryNoFollowSymLinks in interface FileisDirectoryNoFollowSymLinks in class IoFilepublic boolean isDirectoryFollowSymLinks()
isDirectoryFollowSymLinks in interface FileisDirectoryFollowSymLinks in class IoFilepublic boolean isSymbolicLink()
isSymbolicLink in interface FileisSymbolicLink in class IoFilepublic String readSymbolicLinkToPathString() throws IOException
FilereadSymbolicLinkToPathString in interface FilereadSymbolicLinkToPathString in class IoFileIOExceptionpublic long lastModified()
lastModified in interface FilelastModified in class IoFilepublic long getLastModifiedNoFollow()
getLastModifiedNoFollow in interface FilegetLastModifiedNoFollow in class IoFilepublic boolean renameTo(File dest)
FileFile.renameTo(java.io.File).public void createSymbolicLink(String targetPath) throws IOException
createSymbolicLink in interface FilecreateSymbolicLink in class IoFileIOExceptionpublic void move(File toFile) throws IOException
FileFile.renameTo(File) respectively File.renameTo(java.io.File).move in interface Filemove in class IoFileIOExceptionpublic void copyToCopyAttributes(File toFile) throws IOException
FilecopyToCopyAttributes in interface FilecopyToCopyAttributes in class IoFileIOExceptionpublic boolean setLastModified(long lastModified)
setLastModified in interface FilesetLastModified in class IoFilepublic boolean setLastModifiedNoFollow(long lastModified)
setLastModifiedNoFollow in interface FilesetLastModifiedNoFollow in class IoFilepublic String relativize(File target)
relativize in interface Filerelativize in class IoFileCopyright © 2013–2017. All rights reserved.