Package jnr.posix
Class JavaFileStat
- java.lang.Object
-
- jnr.posix.AbstractJavaFileStat
-
- jnr.posix.JavaFileStat
-
- All Implemented Interfaces:
FileStat
public class JavaFileStat extends AbstractJavaFileStat
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
JavaFileStat.PreNIO2FileAttributes
-
Field Summary
Fields Modifier and Type Field Description (package private) java.nio.file.attribute.BasicFileAttributes
attrs
(package private) java.nio.file.attribute.DosFileAttributes
dosAttrs
(package private) java.nio.file.attribute.PosixFileAttributes
posixAttrs
(package private) short
st_mode
-
Fields inherited from class jnr.posix.AbstractJavaFileStat
handler, posix
-
-
Constructor Summary
Constructors Constructor Description JavaFileStat(POSIX posix, POSIXHandler handler)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
atime()
Limitation: Java has no access time support, so we return mtime as the next best thing.private short
calculateMode(java.io.File file, short st_mode)
private static short
calculateSymlink(java.io.File file, short st_mode)
long
ctime()
boolean
isDirectory()
boolean
isEmpty()
boolean
isExecutable()
boolean
isExecutableReal()
boolean
isFile()
boolean
isGroupOwned()
boolean
isIdentical(FileStat other)
boolean
isOwned()
boolean
isReadable()
boolean
isReadableReal()
boolean
isROwned()
boolean
isSymlink()
boolean
isWritable()
boolean
isWritableReal()
int
mode()
long
mtime()
void
setup(java.lang.String filePath)
long
st_size()
Note: Name 'st_size' since Structure has a 'size' method already
-
-
-
Constructor Detail
-
JavaFileStat
public JavaFileStat(POSIX posix, POSIXHandler handler)
-
-
Method Detail
-
setup
public void setup(java.lang.String filePath)
-
calculateMode
private short calculateMode(java.io.File file, short st_mode)
-
calculateSymlink
private static short calculateSymlink(java.io.File file, short st_mode) throws java.io.IOException
- Throws:
java.io.IOException
-
atime
public long atime()
Limitation: Java has no access time support, so we return mtime as the next best thing.
-
ctime
public long ctime()
-
isDirectory
public boolean isDirectory()
-
isEmpty
public boolean isEmpty()
-
isExecutable
public boolean isExecutable()
-
isExecutableReal
public boolean isExecutableReal()
-
isFile
public boolean isFile()
-
isGroupOwned
public boolean isGroupOwned()
-
isIdentical
public boolean isIdentical(FileStat other)
-
isOwned
public boolean isOwned()
-
isROwned
public boolean isROwned()
-
isReadable
public boolean isReadable()
-
isReadableReal
public boolean isReadableReal()
-
isSymlink
public boolean isSymlink()
-
isWritable
public boolean isWritable()
-
isWritableReal
public boolean isWritableReal()
-
mode
public int mode()
-
mtime
public long mtime()
-
st_size
public long st_size()
Description copied from interface:FileStat
Note: Name 'st_size' since Structure has a 'size' method already- Returns:
- size of the stat structure
-
-