All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class posix.File

java.lang.Object
   |
   +----posix.File

public class File
extends Object

Variable Index

 o F_OK
existence
 o path
 o R_OK
read access
 o W_OK
write access
 o X_OK
execute access

Constructor Index

 o File(String)

Method Index

 o access(int)
Check the accessibility of the file.
 o chmod(int)
Set the permissions mode of a file.
 o chown(int, int)
Set the ownership of a file.
 o getPath()
 o initializeConstants()
 o link(String)
Link this file to another.
 o rename(String)
Rename a file.
 o unlink()
Remove the link to this file.

Variables

 o R_OK
 public static final int R_OK
read access

 o W_OK
 public static final int W_OK
write access

 o X_OK
 public static final int X_OK
execute access

 o F_OK
 public static final int F_OK
existence

 o path
 protected String path

Constructors

 o File
 public File(String path)

Methods

 o initializeConstants
 protected static native void initializeConstants()
 o getPath
 public String getPath()
 o link
 public native void link(String path) throws PosixException
Link this file to another.

Parameters:
path - the pathname of the new directory entry.
Throws: PosixException
EACCES, EEXIST, EMLINK, ENAMETOOLONG, ENOENT, ENOSPC, ENOTDIR, EPERM, EROFS, EXDEV.
 o unlink
 public native void unlink() throws PosixException
Remove the link to this file.

Parameters:
path - the pathname of the file to be unlinked.
Throws: PosixException
EACCES, EBUSY, ENAMETOOLONG, ENOENT, ENOTDIR, EPERM, EROFS.
 o rename
 public native void rename(String newName) throws PosixException
Rename a file.

Throws: PosixException
EACCES, EBUSY, EEXIST, EINVAL, EISDIR, ENAMETOOLONG, ENOENT, ENOSPC, ENOTDIR, EROFS, EXDEV.
 o access
 public native void access(int mode) throws PosixException
Check the accessibility of the file.

Parameters:
mode - the bitwise OR of R_OK, W_OK, X_OK
Throws: PosixException
EACCES, ENAMETOOLONG, ENOENT, ENOTDIR, EROFS.
 o chmod
 public native void chmod(int mode) throws PosixException
Set the permissions mode of a file. The mode is a bitwise-or of file permissions

Throws: PosixException
EACCES, ENAMETOOLONG, ENOENT, ENOTDIR, EPERM, EROFS.
See Also:
Stat
 o chown
 public native void chown(int owner,
                          int group) throws PosixException
Set the ownership of a file.

Throws: PosixException
EACCES, ENAMETOOLONG, ENOTDIR, EPERM, EROFS.

All Packages  Class Hierarchy  This Package  Previous  Next  Index