|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.File posix.File
public class File
Extend java.io.File with posix features.
Field Summary |
---|
Fields inherited from class java.io.File |
---|
pathSeparator, pathSeparatorChar, separator, separatorChar |
Constructor Summary | |
---|---|
File(File dir,
String name)
|
|
File(String name)
|
|
File(String dir,
String name)
|
Method Summary | |
---|---|
int |
getMode()
Return the posix file mode. |
Stat |
getStat()
Return the posix Stat record for the file. |
long |
lastAccessed()
Return the posix last accessed time (atime). |
long |
lastChanged()
Return the posix last changed time (ctime). |
boolean |
setLastAccessed(long atime)
Set the posix last accessed time (atime). |
void |
setMode(int mode)
Set the posix file permission bits. |
void |
setOwner(int uid,
int gid)
Set the posix file owner and group. |
void |
setTimes(long atime,
long mtime)
Set last accessed and last modified times. |
Methods inherited from class java.io.File |
---|
canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getName, getParent, getParentFile, getPath, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setLastModified, setReadOnly, toString, toURI, toURL |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public File(String name)
public File(String dir, String name)
public File(File dir, String name)
Method Detail |
---|
public long lastAccessed()
public boolean setLastAccessed(long atime)
atime
- the new last accessed time as Java milliseconds since 1970
public void setTimes(long atime, long mtime) throws IOException
IOException
- on failurepublic long lastChanged()
public int getMode()
public void setMode(int mode) throws IOException
mode
- the new file permission bits
IOException
- on failurepublic void setOwner(int uid, int gid) throws IOException
uid
- the new file ownergid
- the new file group
IOException
- on failurepublic Stat getStat() throws IOException
IOException
- on failure
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |