|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.runtime.FileSystem
public class FileSystem
Interface to filesystem of underlying operating system. Historically this has provided a blocking IO abstraction on top of non-blocking IO, which was necessary for green threads. The current code contains only abstractions for dealing with things like file status.
Field Summary | |
---|---|
static int |
ACCESS_F_OK
|
static int |
ACCESS_R_OK
|
static int |
ACCESS_W_OK
|
static int |
ACCESS_X_OK
|
static int |
OPEN_APPEND
|
static int |
OPEN_MODIFY
|
static int |
OPEN_READ
|
static int |
OPEN_WRITE
|
static int |
SEEK_CUR
|
static int |
SEEK_END
|
static int |
SEEK_SET
|
static int |
STAT_EXISTS
|
static int |
STAT_IS_DIRECTORY
|
static int |
STAT_IS_FILE
|
static int |
STAT_IS_READABLE
|
static int |
STAT_IS_WRITABLE
|
static int |
STAT_LAST_MODIFIED
|
static int |
STAT_LENGTH
|
Constructor Summary | |
---|---|
FileSystem()
|
Method Summary | |
---|---|
static int |
access(String fileName,
int kind)
Get user's perms for a file. |
static int |
bytesAvailable(int fd)
|
static void |
initializeStandardStreams()
Called from VM.boot to set up java.lang.System.in, java.lang.System.out, and java.lang.System.err |
static int |
readByte(int fd)
Read single byte from file. |
static int |
readBytes(int fd,
byte[] buf,
int off,
int cnt)
Read multiple bytes. |
static int |
stat(String fileName,
int kind)
Get file status. |
static boolean |
sync(int fd)
|
static int |
writeByte(int fd,
int b)
Write single byte to file |
static int |
writeBytes(int fd,
byte[] buf,
int off,
int cnt)
Write multiple bytes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int OPEN_READ
public static final int OPEN_WRITE
public static final int OPEN_MODIFY
public static final int OPEN_APPEND
public static final int SEEK_SET
public static final int SEEK_CUR
public static final int SEEK_END
public static final int STAT_EXISTS
public static final int STAT_IS_FILE
public static final int STAT_IS_DIRECTORY
public static final int STAT_IS_READABLE
public static final int STAT_IS_WRITABLE
public static final int STAT_LAST_MODIFIED
public static final int STAT_LENGTH
public static final int ACCESS_F_OK
public static final int ACCESS_R_OK
public static final int ACCESS_W_OK
public static final int ACCESS_X_OK
Constructor Detail |
---|
public FileSystem()
Method Detail |
---|
public static int stat(String fileName, int kind)
fileName
- file namekind
- kind of info desired (one of STAT_XXX, above)
public static int access(String fileName, int kind)
fileName
- file namekind
- kind of access perm(s) to check for (ACCESS_W_OK,...)
public static int readByte(int fd)
fd
- file descriptor
public static int writeByte(int fd, int b)
fd
- file descriptorb
- byte to be written
public static int readBytes(int fd, byte[] buf, int off, int cnt)
buf
- a pinned byte array to read into
public static int writeBytes(int fd, byte[] buf, int off, int cnt)
buf
- a pinned byte array to write from
public static boolean sync(int fd)
public static int bytesAvailable(int fd)
public static void initializeStandardStreams()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |