|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.File org.apache.wicket.util.file.File
public class File
Simple extension of File that adds an implementation of IModifiable for files. This allows the ModificationWatcher class to watch files for modification. The IModifiable.lastModifiedTime() method also returns a Time object with a more convenient API than either Date or a value in milliseconds.
Field Summary |
---|
Fields inherited from class java.io.File |
---|
pathSeparator, pathSeparatorChar, separator, separatorChar |
Constructor Summary | |
---|---|
File(File file)
Construct. |
|
File(File parent,
String child)
Constructor. |
|
File(File parent,
String child)
Construct. |
|
File(String pathname)
Constructor. |
|
File(String parent,
String child)
Constructor. |
|
File(URI uri)
Constructor. |
Method Summary | |
---|---|
String |
getExtension()
|
Folder |
getParentFolder()
|
Time |
lastModifiedTime()
Returns a Time object representing the most recent time this file was modified. |
String |
readString()
|
boolean |
remove()
|
void |
sync()
Force contents of file to physical storage |
void |
write(File file)
Writes the given file to this one |
int |
write(InputStream input)
Writes the given input stream to this file |
void |
write(String string)
Write the given string to this file |
Methods inherited from class java.io.File |
---|
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toString, toURI, toURL |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public File(File parent, String child)
parent
- parentchild
- childpublic File(File parent, String child)
parent
- child
- public File(File file)
file
- File from java.io packagepublic File(String pathname)
pathname
- path namepublic File(String parent, String child)
parent
- parentchild
- childpublic File(URI uri)
uri
- file uriMethod Detail |
---|
public String getExtension()
public Folder getParentFolder()
public final Time lastModifiedTime()
lastModifiedTime
in interface IModifiable
public final String readString() throws IOException
IOException
public boolean remove()
File.delete()
public void sync() throws IOException
IOException
public final void write(File file) throws IOException
file
- The file to copy
IOException
public final int write(InputStream input) throws IOException
input
- The input
IOException
public final void write(String string) throws IOException
string
- The string to write
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |