java.lang.Object
com.aoapps.io.posix.Stat
One stat call will have all of its output stored in an instance of this class.
- Author:
- AO Industries, Inc.
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionStat
(boolean exists, long device, long inode, long mode, int numberLinks, int uid, int gid, long deviceIdentifier, long size, int blockSize, long blockCount, long accessTime, long modifyTime, long changeTime) Creates a new stat given all the values. -
Method Summary
Modifier and TypeMethodDescriptionboolean
exists()
Determines if a file exists, a symbolic link with an invalid destination is still considered to exist.long
Gets the last access to this file.long
Gets the block count for this file.int
Gets the block size for this file.long
Gets the change time of this file.long
Gets the device for this file.long
Gets the device identifier for this file.int
getGid()
Gets the group ID for this file.long
getInode()
Gets the inode for this file.long
getMode()
Gets the permission bits of the mode of this file.Gets a String representation of the mode of this file similar to the output of the POSIXls
command.long
Gets the modification time of the file.int
Gets the link count for this file.long
Gets the complete mode of the file, including the bits representing the file type.long
getSize()
Gets the size of the file.int
getUid()
Gets the user ID of the file.boolean
Determines if this file represents a block device.boolean
Determines if this file represents a character device.boolean
Determines if this file represents a directory.boolean
isFifo()
Determines if this file represents a FIFO.boolean
Determines if this file represents a regular file.boolean
isSocket()
Determines if this file represents a socket.boolean
Determines if this file represents a sybolic link.
-
Field Details
-
NOT_EXISTS
A stat that represents a non-existent file.
-
-
Constructor Details
-
Stat
public Stat(boolean exists, long device, long inode, long mode, int numberLinks, int uid, int gid, long deviceIdentifier, long size, int blockSize, long blockCount, long accessTime, long modifyTime, long changeTime) Creates a new stat given all the values.
-
-
Method Details
-
exists
public boolean exists()Determines if a file exists, a symbolic link with an invalid destination is still considered to exist. -
getDevice
Gets the device for this file.- Throws:
FileNotFoundException
-
getInode
Gets the inode for this file.- Throws:
FileNotFoundException
-
getRawMode
Gets the complete mode of the file, including the bits representing the file type.- Throws:
FileNotFoundException
-
getMode
Gets the permission bits of the mode of this file.- Throws:
FileNotFoundException
-
getModeString
Gets a String representation of the mode of this file similar to the output of the POSIXls
command.- Throws:
FileNotFoundException
-
getNumberLinks
Gets the link count for this file.- Throws:
FileNotFoundException
-
getUid
Gets the user ID of the file.- Throws:
FileNotFoundException
-
getGid
Gets the group ID for this file.- Throws:
FileNotFoundException
-
getDeviceIdentifier
Gets the device identifier for this file.- Throws:
FileNotFoundException
-
getSize
Gets the size of the file.- Throws:
FileNotFoundException
-
getBlockSize
Gets the block size for this file.- Throws:
FileNotFoundException
-
getBlockCount
Gets the block count for this file.- Throws:
FileNotFoundException
-
getAccessTime
Gets the last access to this file.- Throws:
FileNotFoundException
-
getModifyTime
Gets the modification time of the file.- Throws:
FileNotFoundException
-
getChangeTime
Gets the change time of this file.- Throws:
FileNotFoundException
-
isBlockDevice
Determines if this file represents a block device.- Throws:
FileNotFoundException
-
isCharacterDevice
Determines if this file represents a character device.- Throws:
FileNotFoundException
-
isDirectory
Determines if this file represents a directory.- Throws:
FileNotFoundException
-
isFifo
Determines if this file represents a FIFO.- Throws:
FileNotFoundException
-
isRegularFile
Determines if this file represents a regular file.- Throws:
FileNotFoundException
-
isSocket
Determines if this file represents a socket.- Throws:
FileNotFoundException
-
isSymLink
Determines if this file represents a sybolic link.- Throws:
FileNotFoundException
-