Class FileStat
- java.lang.Object
-
- net.rubygrapefruit.platform.internal.FileStat
-
- All Implemented Interfaces:
FileInfo
,PosixFileInfo
public class FileStat extends java.lang.Object implements PosixFileInfo
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.rubygrapefruit.platform.FileInfo
FileInfo.Type
-
-
Constructor Summary
Constructors Constructor Description FileStat(java.lang.String path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
details(int type, int mode, int uid, int gid, long size, long modificationTime, int blockSize)
long
getBlockSize()
Returns the optimal block size for reading or writing to this file, in bytes.int
getGid()
Returns the GID of this file.long
getLastModifiedTime()
Returns the last modification time of this file, in ms since epoch.int
getMode()
Returns the mode, or permissions, of this file.long
getSize()
Returns the size of this file, in bytes.FileInfo.Type
getType()
Returns the type of this file.int
getUid()
Returns the UID of this file.java.lang.String
toString()
-
-
-
Method Detail
-
details
public void details(int type, int mode, int uid, int gid, long size, long modificationTime, int blockSize)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getMode
public int getMode()
Description copied from interface:PosixFileInfo
Returns the mode, or permissions, of this file.- Specified by:
getMode
in interfacePosixFileInfo
-
getType
public FileInfo.Type getType()
Description copied from interface:FileInfo
Returns the type of this file.
-
getUid
public int getUid()
Description copied from interface:PosixFileInfo
Returns the UID of this file.- Specified by:
getUid
in interfacePosixFileInfo
-
getGid
public int getGid()
Description copied from interface:PosixFileInfo
Returns the GID of this file.- Specified by:
getGid
in interfacePosixFileInfo
-
getSize
public long getSize()
Description copied from interface:FileInfo
Returns the size of this file, in bytes. Returns 0 when this file is not a regular file.
-
getBlockSize
public long getBlockSize()
Description copied from interface:PosixFileInfo
Returns the optimal block size for reading or writing to this file, in bytes.- Specified by:
getBlockSize
in interfacePosixFileInfo
-
getLastModifiedTime
public long getLastModifiedTime()
Description copied from interface:PosixFileInfo
Returns the last modification time of this file, in ms since epoch.- Specified by:
getLastModifiedTime
in interfaceFileInfo
- Specified by:
getLastModifiedTime
in interfacePosixFileInfo
-
-