All Packages Class Hierarchy This Package Previous Next Index
Class posix.Stat
java.lang.Object
|
+----posix.Stat
- public class Stat
- extends Object
-
RGRP
- read for group
-
ROTH
- read for other
-
RUSR
- read for user
-
RWXG
- read, write, execute for group
-
RWXO
- read, write, execute for other
-
RWXU
- read, write, execute for user
-
SGID
- set group id on execution
-
SUID
- set user id on execution
-
WGRP
- write for group
-
WOTH
- write for other
-
WUSR
- write for user
-
XGRP
- execute for group
-
XOTH
- execute for other
-
XUSR
- execute for user
-
Stat(File)
- Constructs a Stat from the File object.
-
Stat(OpenFile)
- Constructs a Stat from an OpenFile.
-
Stat(String)
- Constructs a Stat from the filename.
-
getAccessTime()
- Returns the time of last access.
-
getDevice()
- Returns the ID of device within this file.
-
getGID()
- Returns group id of the file's owner.
-
getInode()
- Returns the file serial number.
-
getLinkCount()
- Returns the number of links to this file.
-
getMode()
- Return the permissions mode of the file.
-
getModifiedTime()
- Returns the time of last data modification.
-
getSize()
- Returns size of the file for regular types.
-
getStatusChange()
- Returns the time of last status change.
-
getUID()
- Returns user id of the file's owner.
-
initializeConstants()
-
-
isBlockSpecial()
- True if the file is a block special file
-
isCharacterSpecial()
- True if the file is a character special file
-
isDirectory()
- True if the file is a directory file
-
isFIFO()
- True if the file is a directory file
-
isRegularFile()
- True if the file is a pipe or FIFO special file
-
stat(String)
-
RWXU
public static final int RWXU
- read, write, execute for user
RUSR
public static final int RUSR
- read for user
WUSR
public static final int WUSR
- write for user
XUSR
public static final int XUSR
- execute for user
RWXG
public static final int RWXG
- read, write, execute for group
RGRP
public static final int RGRP
- read for group
WGRP
public static final int WGRP
- write for group
XGRP
public static final int XGRP
- execute for group
RWXO
public static final int RWXO
- read, write, execute for other
ROTH
public static final int ROTH
- read for other
WOTH
public static final int WOTH
- write for other
XOTH
public static final int XOTH
- execute for other
SUID
public static final int SUID
- set user id on execution
SGID
public static final int SGID
- set group id on execution
Stat
public Stat(String path) throws PosixException
- Constructs a Stat from the filename.
- Throws: PosixException
- EACCES, ENAMETOOLONG, ENOENT,
ENOTDIR.
Stat
public Stat(File file) throws PosixException
- Constructs a Stat from the File object.
- Throws: PosixException
- EACCES, ENAMETOOLONG, ENOENT,
ENOTDIR.
Stat
public Stat(OpenFile fd) throws PosixException
- Constructs a Stat from an OpenFile.
- Throws: PosixException
- EACCES, ENAMETOOLONG, ENOENT,
ENOTDIR, EBADF.
initializeConstants
protected static native void initializeConstants()
stat
protected native int stat(String path)
isDirectory
public native boolean isDirectory()
- True if the file is a directory file
isCharacterSpecial
public native boolean isCharacterSpecial()
- True if the file is a character special file
isBlockSpecial
public native boolean isBlockSpecial()
- True if the file is a block special file
isRegularFile
public native boolean isRegularFile()
- True if the file is a pipe or FIFO special file
isFIFO
public native boolean isFIFO()
- True if the file is a directory file
getMode
public int getMode()
- Return the permissions mode of the file.
Posix type: mode_t, typically u_short
- See Also:
- File
getInode
public long getInode()
- Returns the file serial number.
Posix type: ino_t, typically unsigned long
getDevice
public int getDevice()
- Returns the ID of device within this file.
Posix type: dev_t, typically unsigned short
getLinkCount
public int getLinkCount()
- Returns the number of links to this file.
Posix type: nlink_t, typically unsigned short
getUID
public int getUID()
- Returns user id of the file's owner.
Posix type: uid_t, typically unsigned int
getGID
public int getGID()
- Returns group id of the file's owner.
Posix type: gid_t, typically unsigned int
getSize
public long getSize()
- Returns size of the file for regular types.
For other file types, the size of the file is
unspecified.
Posix type: off_t, typically long
getAccessTime
public long getAccessTime()
- Returns the time of last access.
Posix type: time_t, typically long
getModifiedTime
public long getModifiedTime()
- Returns the time of last data modification.
Posix type: time_t, typically long
getStatusChange
public long getStatusChange()
- Returns the time of last status change.
Posix type: time_t, typically long
All Packages Class Hierarchy This Package Previous Next Index