|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectposix.Stat
public class Stat
File status record for posix systems. The cross-platform features of java.io.File do not cover everything available on posix systems.
Field Summary | |
---|---|
long |
atime
Time of last access |
static int |
BLK
|
int |
blksize
Optimal blocksize for filesystem. |
long |
blocks
Actual number of blocks allocated. |
static int |
CHR
|
long |
ctime
Time of last file status change |
int |
dev
ID of device containing a directory entry for this file. |
static int |
DIR
|
static int |
FIFO
|
int |
gid
Group ID of the file's group |
int |
ino
File serial number. |
static int |
LNK
|
int |
mode
File mode. |
long |
mtime
Time of last data modification |
int |
nlink
Number of links. |
int |
rdev
ID of device if special file. |
static int |
REG
|
long |
size
File size in bytes. |
static int |
SOCK
|
int |
uid
User ID of the file's owner |
Constructor Summary | |
---|---|
Stat()
Create a blank Stat record. |
|
Stat(java.lang.String path)
Create a Stat record for the named file. |
|
Stat(java.lang.String path,
boolean follow)
Create a Stat record for the named file. |
Method Summary | |
---|---|
boolean |
isBLK()
True if Stat is for a block device. |
boolean |
isCHR()
True if Stat is for a character device. |
boolean |
isDIR()
True if Stat is for a directory. |
boolean |
isFIFO()
True if Stat is for a unix pipe. |
boolean |
isLNK()
True if Stat is for a symbolic link. |
boolean |
isREG()
True if Stat is for a regular file. |
boolean |
isSOCK()
True if Stat is for a unix socket. |
int |
lstat(java.lang.String path)
Fill in fields from a file path. |
static boolean |
S_IS(int what,
int mode)
Test posix file modes. |
int |
stat(java.lang.String path)
Fill in fields from a file path. |
static int |
umask()
Return the current process file creation mask. |
static int |
umask(int mask)
Set the process file creation mask. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int dev
public int ino
public int mode
public int nlink
public int uid
public int gid
public int rdev
public long size
public long atime
public long mtime
public long ctime
public int blksize
public long blocks
public static final int LNK
public static final int REG
public static final int DIR
public static final int CHR
public static final int BLK
public static final int FIFO
public static final int SOCK
Constructor Detail |
---|
public Stat()
public Stat(java.lang.String path) throws java.io.IOException
path
- a posix compliant path name for the file
java.io.IOException
public Stat(java.lang.String path, boolean follow) throws java.io.IOException
path
- a posix compliant path name for the filefollow
- follow symlinks if true
java.io.IOException
Method Detail |
---|
public int stat(java.lang.String path)
public int lstat(java.lang.String path)
stat(java.lang.String)
, except
that if the path refers to a symbolic link, the information for the link
is retrieved instead of the file it points to.
public static boolean S_IS(int what, int mode)
mode
- the posix file modewhat
- one of LNK,REG,DIR,CHR,BLK,FIFO,SOCKpublic final boolean isLNK()
public final boolean isREG()
public final boolean isDIR()
public final boolean isCHR()
public final boolean isBLK()
public final boolean isFIFO()
public final boolean isSOCK()
public static int umask(int mask)
synchronized (Stat.class) { int oldmask = Stat.umask(newmask); createFile(); Stat.umask(oldmask); }
public static int umask()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |