All Packages Class Hierarchy This Package Previous Next Index
Class posix.File
java.lang.Object
|
+----posix.File
- public class File
- extends Object
-
F_OK
- existence
-
path
-
-
R_OK
- read access
-
W_OK
- write access
-
X_OK
- execute access
-
File(String)
-
-
access(int)
- Check the accessibility of the file.
-
chmod(int)
- Set the permissions mode of a file.
-
chown(int, int)
- Set the ownership of a file.
-
getPath()
-
-
initializeConstants()
-
-
link(String)
- Link this file to another.
-
rename(String)
- Rename a file.
-
unlink()
- Remove the link to this file.
R_OK
public static final int R_OK
- read access
W_OK
public static final int W_OK
- write access
X_OK
public static final int X_OK
- execute access
F_OK
public static final int F_OK
- existence
path
protected String path
File
public File(String path)
initializeConstants
protected static native void initializeConstants()
getPath
public String getPath()
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.
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.
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.
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.
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
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