public class JavaFileStat extends java.lang.Object implements FileStat
Modifier and Type | Field and Description |
---|---|
private POSIXHandler |
handler |
private POSIX |
posix |
(package private) int |
st_blksize |
(package private) int |
st_ctime |
(package private) short |
st_mode |
(package private) int |
st_mtime |
(package private) long |
st_size |
Constructor and Description |
---|
JavaFileStat(POSIX posix,
POSIXHandler handler) |
Modifier and Type | Method and Description |
---|---|
long |
atime()
Limitation: Java has no access time support, so we return mtime as the next best thing.
|
long |
blocks() |
long |
blockSize() |
private short |
calculateMode(java.io.File file,
short st_mode) |
private short |
calculateSymlink(java.io.File file,
short st_mode) |
long |
ctime() |
long |
dev() |
java.lang.String |
ftype() |
int |
gid() |
boolean |
groupMember(int gid) |
long |
ino()
Limitation: We have no pure-java way of getting inode.
|
boolean |
isBlockDev() |
boolean |
isCharDev()
Limitation: [see JRUBY-1516] We just pick more likely value.
|
boolean |
isDirectory() |
boolean |
isEmpty() |
boolean |
isExecutable() |
boolean |
isExecutableReal() |
boolean |
isFifo() |
boolean |
isFile() |
boolean |
isGroupOwned() |
boolean |
isIdentical(FileStat other) |
boolean |
isNamedPipe() |
boolean |
isOwned() |
boolean |
isReadable() |
boolean |
isReadableReal() |
boolean |
isROwned() |
boolean |
isSetgid() |
boolean |
isSetuid() |
boolean |
isSocket() |
boolean |
isSticky() |
boolean |
isSymlink() |
boolean |
isWritable() |
boolean |
isWritableReal() |
int |
major(long dev) |
int |
minor(long dev) |
int |
mode() |
long |
mtime() |
int |
nlink() |
long |
rdev() |
void |
setup(java.lang.String path) |
long |
st_size()
Note: Name 'st_size' since Structure has a 'size' method already
|
int |
uid() |
private final POSIXHandler handler
private final POSIX posix
short st_mode
int st_blksize
long st_size
int st_ctime
int st_mtime
public JavaFileStat(POSIX posix, POSIXHandler handler)
public void setup(java.lang.String path)
private short calculateMode(java.io.File file, short st_mode)
private short calculateSymlink(java.io.File file, short st_mode) throws java.io.IOException
java.io.IOException
public long atime()
public boolean groupMember(int gid)
groupMember
in interface FileStat
public long ino()
public boolean isBlockDev()
isBlockDev
in interface FileStat
public boolean isCharDev()
public boolean isDirectory()
isDirectory
in interface FileStat
public boolean isExecutable()
isExecutable
in interface FileStat
public boolean isExecutableReal()
isExecutableReal
in interface FileStat
public boolean isGroupOwned()
isGroupOwned
in interface FileStat
public boolean isIdentical(FileStat other)
isIdentical
in interface FileStat
public boolean isNamedPipe()
isNamedPipe
in interface FileStat
public boolean isReadable()
isReadable
in interface FileStat
public boolean isReadableReal()
isReadableReal
in interface FileStat
public boolean isWritable()
isWritable
in interface FileStat
public boolean isWritableReal()
isWritableReal
in interface FileStat
public long st_size()
FileStat