Note: The JVM must be in a single-byte locale, such as "C", "POSIX", or "en_US". PosixFile makes this assumption in its JNI implementation.
- Author:
- AO Industries, Inc.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The set of supported crypt algorithms.static class
TODO: Java 1.8: Can do this in a pure Java way. -
Field Summary
Modifier and TypeFieldDescriptionstatic final long
Group execute permissions.static final long
Group read permissions.static final long
Group write permissions.static final long
Is a block device.static final long
Is a character special device.static final long
Is a directory.static final long
Is a FIFO.static final long
Is a regular file.static final long
Is a socket.static final long
Is a symbolic link.static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
World execute permissions.static final long
World read permission.static final long
World write permissions.protected final String
The path.static final long
The mode mask for just the file permissions.static final int
The GID of the root user.static final int
The UID of the root user.static final long
Save text image.static final long
Set GID on execute.static final long
Set UID on execute.static final long
The mode mask for just the file type.static final long
Owner execute permissions.static final long
Owner read permissions.static final long
Owner write permissions. -
Constructor Summary
ConstructorDescriptionDeprecated.Please call #PosixFile(PosixFile,String,boolean) to explicitly control whether strict parent checking is performedCreates a new POSIX file.Creates a new POSIX file.Creates a new POSIX file.Creates a new POSIX file.Creates a new POSIX file. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
Ensures that the calling thread is allowed to read thisPosixFile
in any way.static void
Ensures that the calling thread is allowed to read thispath
in any way.final void
Ensures that the calling thread is allowed to write to or modify thisPosixFile
in any way.static void
checkWrite
(String path) Ensures that the calling thread is allowed to write to or modify thispath
in any way.final PosixFile
chown
(int uid, int gid) Changes both the owner and group for a file.boolean
contentEquals
(byte[] otherFile) Compares the contents of a file to a byte[].boolean
contentEquals
(PosixFile otherFile) Compares this contents of this file to the contents of another file.void
Copies one filesystem object to another.static String
Deprecated.Please provide the algorithm and callcrypt(java.lang.String, com.aoapps.io.posix.PosixFile.CryptAlgorithm)
instead.static String
crypt
(String password, PosixFile.CryptAlgorithm algorithm) Hashes a password using the provided crypt algorithm and a defaultSecureRandom
instance, which is not a strong instance to avoid blocking.static String
crypt
(String password, PosixFile.CryptAlgorithm algorithm, SecureRandom secureRandom) Hashes a password using the provided crypt algorithm and the provided random source.static String
Hashes a password using the provided salt.static String
crypt
(String password, SecureRandom secureRandom) Deprecated.Please provide the algorithm and callcrypt(java.lang.String, com.aoapps.io.posix.PosixFile.CryptAlgorithm, java.security.SecureRandom)
instead.final void
delete()
Deletes this file.final void
Deletes this file and if it is a directory, all files below it.boolean
final boolean
exists()
Deprecated.Please use getStat(Stat).exists()final long
Deprecated.Please use getStat(Stat).getAccessTime()final long
Deprecated.Please use getStat(State).getBlockCount()final int
Deprecated.Please use getStat(Stat).getBlockSize()final long
Deprecated.Please use getStat(Stat).getChangeTime()final long
Deprecated.Please use getStat(Stat).getDevice()final long
Deprecated.Please use getStat(Stat).getDeviceIdentifier()final String
Gets the extension for this file.final File
getFile()
Gets theFile
for thisPosixFile
.final String
Deprecated.the use of the wordfilename
is misleading since it represents the entire path, please usegetPath()
instead.final int
getGid()
Deprecated.Please use getStat(Stat).getGid()final long
getInode()
Deprecated.Please use getStat(Stat).getInode()final int
Deprecated.Please use getStat(Stat).getNumberLinks()final long
getMode()
Deprecated.Please use getStat(Stat).getMode()final String
Deprecated.Please use getStat(Stat).getModeString()static String
getModeString
(long mode) Gets a String representation of a mode similar to the output of the POSIXls
command.final long
Deprecated.Please use getStat(Stat).getModifyTime()final PosixFile
Gets the parent of this file ornull
if it doesn't have a parent.final String
getPath()
Gets the path for thisPosixFile
.final FileInputStream
getSecureInputStream
(int uidMin, int gidMin) Securely gets aFileInputStream
to this file, temporarily performing permission changes and ensuring that no symbolic links are anywhere in the path.final FileOutputStream
getSecureOutputStream
(int uid, int gid, long mode, boolean overwrite, int uidMin, int gidMin) Securely gets aFileOutputStream
to this file, temporarily performing permission changes and ensuring that no symbolic links are anywhere in the path.final RandomAccessFile
getSecureRandomAccessFile
(String mode, int uidMin, int gidMin) Securely gets aRandomAccessFile
to this file, temporarily performing permission changes and ensuring that no symbolic links are anywhere in the path.final long
getSize()
Deprecated.Please use getStat(Stat).getSize()getStat()
Stats the file.final long
Deprecated.Please use getStat(Stat).getRawMode()final int
getUid()
Deprecated.Please use getStat(Stat).getUid()int
hashCode()
final boolean
Deprecated.Please use getStat(Stat).isBlockDevice()static boolean
isBlockDevice
(long mode) Determines if a specific mode represents a block device.final boolean
Deprecated.Please use getStat(Stat).isCharacterDevice()static boolean
isCharacterDevice
(long mode) Determines if a specific mode represents a character device.final boolean
Deprecated.Please use getStat(Stat).isDirectory()static boolean
isDirectory
(long mode) Determines if a specific mode represents a directory.final boolean
isFifo()
Deprecated.Please use getStat(Stat).isFifo()static boolean
isFifo
(long mode) Determines if a specific mode represents a FIFO.final boolean
Deprecated.Please use getStat(Stat).isRegularFile()static boolean
isRegularFile
(long mode) Determines if a specific mode represents a regular file.final boolean
Determines if this file is the root directory.final boolean
isSocket()
Deprecated.Please use getStat(Stat).isSocket()static boolean
isSocket
(long mode) Determines if a specific mode represents a socket.final boolean
Deprecated.Please use getStat(Stat).isSymLink()static boolean
isSymLink
(long mode) Determines if a specific mode represents a symbolic link.final PosixFile
Creates a hard link.final PosixFile
Creates a hard link.final String[]
list()
Lists the contents of the directory.static void
Loads the shared library native codelibaocode.so
.final PosixFile
mkdir()
Creates a directory.final PosixFile
mkdir
(boolean makeParents, long mode) Creates a directory and sets its permissions, optionally creating all the parent directories if they do not exist.final PosixFile
mkdir
(boolean makeParents, long mode, int uid, int gid) Creates a directory and sets its permissions, optionally creating all the parent directories if they do not exist.final PosixFile
mkfifo
(long mode) Creates a FIFO.final PosixFile
mknod
(long mode, long device) Creates a device file.static PosixFile
static PosixFile
Deprecated.Please useFiles.createTempFile(java.lang.String, java.lang.String, java.nio.file.attribute.FileAttribute...)
or TempFileContext asFile.deleteOnExit()
is prone to memory leaks in long-running applications.final String
readLink()
Reads a symbolic link.final void
Renames this file, possibly overwriting any previous file.final void
restoreParents
(List<PosixFile.SecuredDirectory> parentsChanged) TODO: Java 1.8: Can do this in a pure Java way.boolean
secureContentEquals
(byte[] otherFile, int uidMin, int gidMin) Compares the contents of a file to a byte[].boolean
secureContentEquals
(PosixFile otherFile, int uidMin, int gidMin) Compares this contents of this file to the contents of another file.final void
secureDeleteRecursive
(int uidMin, int gidMin) Securely deletes this file entry and all files below it while not following symbolic links.final void
secureParents
(List<PosixFile.SecuredDirectory> parentsChanged, int uidMin, int gidMin) TODO: Java 1.8: Can do this in a pure Java way.final PosixFile
setAccessTime
(long atime) Deprecated.This method internally performs an extra stat.final PosixFile
setGid
(int gid) Deprecated.This method internally performs an extra stat.final PosixFile
setGID
(int gid) Deprecated.Please usesetGid(int)
instead.final PosixFile
setMode
(long mode) Sets the permissions for this file.final PosixFile
setModifyTime
(long mtime) Deprecated.This method internally performs an extra stat.final PosixFile
setUid
(int uid) Deprecated.This method internally performs an extra stat.final PosixFile
setUID
(int uid) Deprecated.Please usesetUid(int)
instead.final PosixFile
Creates a symbolic link.final String
toString()
final PosixFile
utime
(long atime, long mtime) Sets the access and modify times for this file.
-
Field Details
-
ROOT_UID
public static final int ROOT_UIDThe UID of the root user.Note: Copied to LinuxServerAccount.java to avoid interproject dependency.
- See Also:
-
ROOT_GID
public static final int ROOT_GIDThe GID of the root user.- See Also:
-
PERMISSION_MASK
public static final long PERMISSION_MASKThe mode mask for just the file permissions.- See Also:
-
OTHER_EXECUTE
public static final long OTHER_EXECUTEWorld execute permissions.- See Also:
-
NOT_OTHER_EXECUTE
public static final long NOT_OTHER_EXECUTE- See Also:
-
OTHER_WRITE
public static final long OTHER_WRITEWorld write permissions.- See Also:
-
NOT_OTHER_WRITE
public static final long NOT_OTHER_WRITE- See Also:
-
OTHER_READ
public static final long OTHER_READWorld read permission.- See Also:
-
NOT_OTHER_READ
public static final long NOT_OTHER_READ- See Also:
-
GROUP_EXECUTE
public static final long GROUP_EXECUTEGroup execute permissions.- See Also:
-
NOT_GROUP_EXECUTE
public static final long NOT_GROUP_EXECUTE- See Also:
-
GROUP_WRITE
public static final long GROUP_WRITEGroup write permissions.- See Also:
-
NOT_GROUP_WRITE
public static final long NOT_GROUP_WRITE- See Also:
-
GROUP_READ
public static final long GROUP_READGroup read permissions.- See Also:
-
NOT_GROUP_READ
public static final long NOT_GROUP_READ- See Also:
-
USER_EXECUTE
public static final long USER_EXECUTEOwner execute permissions.- See Also:
-
NOT_USER_EXECUTE
public static final long NOT_USER_EXECUTE- See Also:
-
USER_WRITE
public static final long USER_WRITEOwner write permissions.- See Also:
-
NOT_USER_WRITE
public static final long NOT_USER_WRITE- See Also:
-
USER_READ
public static final long USER_READOwner read permissions.- See Also:
-
NOT_USER_READ
public static final long NOT_USER_READ- See Also:
-
SAVE_TEXT_IMAGE
public static final long SAVE_TEXT_IMAGESave text image.- See Also:
-
NOT_SAVE_TEXT_IMAGE
public static final long NOT_SAVE_TEXT_IMAGE- See Also:
-
SET_GID
public static final long SET_GIDSet GID on execute.- See Also:
-
NOT_SET_GID
public static final long NOT_SET_GID- See Also:
-
SET_UID
public static final long SET_UIDSet UID on execute.- See Also:
-
NOT_SET_UID
public static final long NOT_SET_UID- See Also:
-
TYPE_MASK
public static final long TYPE_MASKThe mode mask for just the file type.- See Also:
-
IS_FIFO
public static final long IS_FIFOIs a FIFO.- See Also:
-
IS_CHARACTER_DEVICE
public static final long IS_CHARACTER_DEVICEIs a character special device.- See Also:
-
IS_DIRECTORY
public static final long IS_DIRECTORYIs a directory.- See Also:
-
IS_BLOCK_DEVICE
public static final long IS_BLOCK_DEVICEIs a block device.- See Also:
-
IS_REGULAR_FILE
public static final long IS_REGULAR_FILEIs a regular file.- See Also:
-
IS_SYM_LINK
public static final long IS_SYM_LINKIs a symbolic link.- See Also:
-
IS_SOCKET
public static final long IS_SOCKETIs a socket.- See Also:
-
path
The path.
-
-
Constructor Details
-
PosixFile
Deprecated.Please call #PosixFile(PosixFile,String,boolean) to explicitly control whether strict parent checking is performedCreates a new POSIX file.Strictly requires the parent to be a directory if it exists.
- Throws:
IOException
-
PosixFile
Creates a new POSIX file.- Parameters:
strict
- When strictly checking, a parent must be a directory if it exists.- Throws:
IOException
-
PosixFile
Creates a new POSIX file. -
PosixFile
Creates a new POSIX file. -
PosixFile
Creates a new POSIX file. -
PosixFile
Creates a new POSIX file.
-
-
Method Details
-
loadLibrary
public static void loadLibrary()Loads the shared library native codelibaocode.so
. -
checkRead
Ensures that the calling thread is allowed to read thisPosixFile
in any way.- Throws:
IOException
-
checkRead
Ensures that the calling thread is allowed to read thispath
in any way.- Throws:
IOException
-
checkWrite
Ensures that the calling thread is allowed to write to or modify thisPosixFile
in any way.- Throws:
IOException
-
checkWrite
Ensures that the calling thread is allowed to write to or modify thispath
in any way.- Throws:
IOException
-
chown
Changes both the owner and group for a file.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
getStat
Stats the file.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
contentEquals
Compares this contents of this file to the contents of another file.This method will follow both path symbolic links and a final symbolic link.
- Throws:
IOException
-
contentEquals
Compares the contents of a file to a byte[].This method will follow both path symbolic links and a final symbolic link.
- Throws:
IOException
-
secureContentEquals
Compares this contents of this file to the contents of another file.This method will not follow any symbolic links and is not subject to race conditions.
TODO: Java 1.8: Can do this in a pure Java way
- Throws:
IOException
-
secureContentEquals
Compares the contents of a file to a byte[].This method will not follow any symbolic links and is not subject to race conditions.
TODO: Java 1.8: Can do this in a pure Java way
- Throws:
IOException
-
copyTo
Copies one filesystem object to another. It supports block devices, directories, fifos, regular files, and symbolic links. Directories are not copied recursively.This method will follow both path symbolic links and a final symbolic link.
- Throws:
IOException
-
crypt
Hashes a password using the provided salt. The salt includes anysalt prefix
for the algorithm.Please refer to
man 3 crypt
for more details. -
crypt
public static String crypt(String password, PosixFile.CryptAlgorithm algorithm, SecureRandom secureRandom) Hashes a password using the provided crypt algorithm and the provided random source. -
crypt
Deprecated.Please provide the algorithm and callcrypt(java.lang.String, com.aoapps.io.posix.PosixFile.CryptAlgorithm)
instead.Hashes a password using the MD5 crypt algorithm and a defaultSecureRandom
instance, which is not a strong instance to avoid blocking. -
crypt
Deprecated.Please provide the algorithm and callcrypt(java.lang.String, com.aoapps.io.posix.PosixFile.CryptAlgorithm, java.security.SecureRandom)
instead.Hashes a password using the MD5 crypt algorithm and the provided random source. -
crypt
Hashes a password using the provided crypt algorithm and a defaultSecureRandom
instance, which is not a strong instance to avoid blocking. -
delete
Deletes this file.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
- See Also:
-
deleteRecursive
Deletes this file and if it is a directory, all files below it.Due to a race conditition, this method will follow symbolic links. Please use
secureDeleteRecursive
instead.- Throws:
IOException
- See Also:
-
secureParents
public final void secureParents(List<PosixFile.SecuredDirectory> parentsChanged, int uidMin, int gidMin) throws IOException TODO: Java 1.8: Can do this in a pure Java way.- Throws:
IOException
-
restoreParents
public final void restoreParents(List<PosixFile.SecuredDirectory> parentsChanged) throws IOException TODO: Java 1.8: Can do this in a pure Java way.- Throws:
IOException
-
secureDeleteRecursive
Securely deletes this file entry and all files below it while not following symbolic links. This method must be called with root privileges to properly avoid race conditions. If not running with root privileges, usedeleteRecursive
instead.In order to avoid race conditions, all directories above this directory will have their permissions set so that regular users cannot modify the directories. After each parent directory has its permissions set it will then check for symbolic links. Once all of the parent directories have been completed, the filesystem will recursively have its permissions reset, scans for symlinks, and deletes performed in such a way all race conditions are avoided. Finally, the parent directory permissions that were modified will be restored.
TODO: Java 1.8: Can do this in a pure Java way
- Throws:
IOException
- See Also:
-
exists
Deprecated.Please use getStat(Stat).exists()Determines if a file exists, a symbolic link with an invalid destination is still considered to exist.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
getAccessTime
Deprecated.Please use getStat(Stat).getAccessTime()Gets the last access to this file.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
getBlockCount
Deprecated.Please use getStat(State).getBlockCount()Gets the block count for this file.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
getBlockSize
Deprecated.Please use getStat(Stat).getBlockSize()Gets the block size for this file.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
getChangeTime
Deprecated.Please use getStat(Stat).getChangeTime()Gets the change time of this file.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
getDevice
Deprecated.Please use getStat(Stat).getDevice()Gets the device for this file.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
getDeviceIdentifier
Deprecated.Please use getStat(Stat).getDeviceIdentifier()Gets the device identifier for this file.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
getExtension
Gets the extension for this file. -
getFile
Gets theFile
for thisPosixFile
. Not synchronized because multiple instantiation is acceptable. -
getFilename
Deprecated.the use of the wordfilename
is misleading since it represents the entire path, please usegetPath()
instead.Gets the path for thisPosixFile
.- See Also:
-
getPath
Gets the path for thisPosixFile
. -
getGid
Deprecated.Please use getStat(Stat).getGid()Gets the group ID for this file.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
getInode
Deprecated.Please use getStat(Stat).getInode()Gets the inode for this file.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
getLinkCount
Deprecated.Please use getStat(Stat).getNumberLinks()Gets the link count for this file.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
getMode
Deprecated.Please use getStat(Stat).getMode()Gets the permission bits of the mode of this file.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
getModeString
Gets a String representation of a mode similar to the output of the POSIXls
command. -
getModeString
Deprecated.Please use getStat(Stat).getModeString()Gets a String representation of the mode of this file similar to the output of the POSIXls
command.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
getSecureInputStream
Securely gets aFileInputStream
to this file, temporarily performing permission changes and ensuring that no symbolic links are anywhere in the path.TODO: Java 1.8: Can do this in a pure Java way
- Throws:
IOException
-
getSecureOutputStream
public final FileOutputStream getSecureOutputStream(int uid, int gid, long mode, boolean overwrite, int uidMin, int gidMin) throws IOException Securely gets aFileOutputStream
to this file, temporarily performing permission changes and ensuring that no symbolic links are anywhere in the path.TODO: Consider the impact of using mktemp instead of secureParents/restoreParents because there is the possibility that permissions may not be restored if the JVM is shutdown at that moment.
TODO: Java 1.8: Can do this in a pure Java way
- Throws:
IOException
-
getSecureRandomAccessFile
public final RandomAccessFile getSecureRandomAccessFile(String mode, int uidMin, int gidMin) throws IOException Securely gets aRandomAccessFile
to this file, temporarily performing permission changes and ensuring that no symbolic links are anywhere in the path.TODO: Java 1.8: Can do this in a pure Java way
- Throws:
IOException
-
getParent
Gets the parent of this file ornull
if it doesn't have a parent. Not synchronized because multiple instantiation is acceptable. -
getStatMode
Deprecated.Please use getStat(Stat).getRawMode()Gets the complete mode of the file, including the bits representing the file type.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
getModifyTime
Deprecated.Please use getStat(Stat).getModifyTime()Gets the modification time of the file.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
getSize
Deprecated.Please use getStat(Stat).getSize()Gets the size of the file.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
mktemp
Deprecated.Securely creates a temporary file, not deleting on exit. In order to be secure, though, the directory needs to be secure, or at least have the sticky bit set.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
- See Also:
-
mktemp
@Deprecated public static PosixFile mktemp(String template, boolean deleteOnExit) throws IOException Deprecated.Please useFiles.createTempFile(java.lang.String, java.lang.String, java.nio.file.attribute.FileAttribute...)
or TempFileContext asFile.deleteOnExit()
is prone to memory leaks in long-running applications.Securely creates a temporary file. In order to be secure, though, the directory needs to be secure, or at least have the sticky bit set.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
getUid
Deprecated.Please use getStat(Stat).getUid()Gets the user ID of the file.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
isBlockDevice
public static boolean isBlockDevice(long mode) Determines if a specific mode represents a block device. -
isBlockDevice
Deprecated.Please use getStat(Stat).isBlockDevice()Determines if this file represents a block device.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
isCharacterDevice
public static boolean isCharacterDevice(long mode) Determines if a specific mode represents a character device. -
isCharacterDevice
Deprecated.Please use getStat(Stat).isCharacterDevice()Determines if this file represents a character device.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
isDirectory
public static boolean isDirectory(long mode) Determines if a specific mode represents a directory. -
isDirectory
Deprecated.Please use getStat(Stat).isDirectory()Determines if this file represents a directory.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
isFifo
public static boolean isFifo(long mode) Determines if a specific mode represents a FIFO. -
isFifo
Deprecated.Please use getStat(Stat).isFifo()Determines if this file represents a FIFO.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
isRegularFile
public static boolean isRegularFile(long mode) Determines if a specific mode represents a regular file. -
isRegularFile
Deprecated.Please use getStat(Stat).isRegularFile()Determines if this file represents a regular file.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
isRootDirectory
public final boolean isRootDirectory()Determines if this file is the root directory. -
isSocket
public static boolean isSocket(long mode) Determines if a specific mode represents a socket. -
isSocket
Deprecated.Please use getStat(Stat).isSocket()Determines if this file represents a socket.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
isSymLink
public static boolean isSymLink(long mode) Determines if a specific mode represents a symbolic link. -
isSymLink
Deprecated.Please use getStat(Stat).isSymLink()Determines if this file represents a sybolic link.This method will follow symbolic links in the path but not a final symbolic link.
- Throws:
IOException
-
list
Lists the contents of the directory.This method will follow symbolic links in the path, including a final symbolic link.
- See Also:
-
mkdir
Creates a directory.This method will follow symbolic links in the path.
- Throws:
IOException
-
mkdir
Creates a directory and sets its permissions, optionally creating all the parent directories if they do not exist.This method will follow symbolic links in the path.
- Throws:
IOException
-
mkdir
Creates a directory and sets its permissions, optionally creating all the parent directories if they do not exist.This method will follow symbolic links in the path.
- Throws:
IOException
-
mknod
Creates a device file.This method will follow symbolic links in the path.
- Throws:
IOException
-
mkfifo
Creates a FIFO.This method will follow symbolic links in the path.
- Throws:
IOException
-
setAccessTime
Deprecated.This method internally performs an extra stat. Please try to use utime(long,long) directly to avoid this extra stat.Sets the access time for this file.This method will follow symbolic links in the path.
- Throws:
IOException
-
setGid
Deprecated.This method internally performs an extra stat. Please try to use chown(int,int) directly to avoid this extra stat.Sets the group ID for this file.This method will follow symbolic links in the path.
- Throws:
IOException
-
setGID
Deprecated.Please usesetGid(int)
instead.Sets the group ID for this file.This method will follow symbolic links in the path.
- Throws:
IOException
-
setMode
Sets the permissions for this file.This method will follow symbolic links in the path.
- Throws:
IOException
-
setModifyTime
Deprecated.This method internally performs an extra stat. Please try to use utime(long,long) directly to avoid this extra stat.Sets the modification time for this file.This method will follow symbolic links in the path.
- Throws:
IOException
-
setUid
Deprecated.This method internally performs an extra stat. Please try to use chown(int,int) directly to avoid this extra stat.Sets the user ID for this file.This method will follow symbolic links in the path.
- Throws:
IOException
-
setUID
Deprecated.Please usesetUid(int)
instead.Sets the user ID for this file.This method will follow symbolic links in the path.
- Throws:
IOException
-
symLink
Creates a symbolic link.This method will follow symbolic links in the path.
- Throws:
IOException
-
link
Creates a hard link.This method will follow symbolic links in the path.
- Throws:
IOException
-
link
Creates a hard link.This method will follow symbolic links in the path.
- Throws:
IOException
-
readLink
Reads a symbolic link.This method will follow symbolic links in the path.
- Throws:
IOException
-
renameTo
Renames this file, possibly overwriting any previous file.This method will follow symbolic links in the path.
- Throws:
IOException
- See Also:
-
toString
-
utime
Sets the access and modify times for this file.This method will follow symbolic links in the path.
- Throws:
IOException
-
hashCode
public int hashCode() -
equals
-