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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStat(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 TypeMethodDescriptionbooleanexists()Determines if a file exists, a symbolic link with an invalid destination is still considered to exist.longGets the last access to this file.longGets the block count for this file.intGets the block size for this file.longGets the change time of this file.longGets the device for this file.longGets the device identifier for this file.intgetGid()Gets the group ID for this file.longgetInode()Gets the inode for this file.longgetMode()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 POSIXlscommand.longGets the modification time of the file.intGets the link count for this file.longGets the complete mode of the file, including the bits representing the file type.longgetSize()Gets the size of the file.intgetUid()Gets the user ID of the file.booleanDetermines if this file represents a block device.booleanDetermines if this file represents a character device.booleanDetermines if this file represents a directory.booleanisFifo()Determines if this file represents a FIFO.booleanDetermines if this file represents a regular file.booleanisSocket()Determines if this file represents a socket.booleanDetermines 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 POSIXlscommand.- 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
-
