|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pf.file.FileInfo
public class FileInfo
This data object holds the name, size and modification date of a file. The file can either be a normal file or one inside a zip archive.
| Constructor Summary | |
|---|---|
FileInfo(java.io.File file)
Initialize the new instance from the given file. |
|
FileInfo(java.lang.String archiveName,
java.util.zip.ZipEntry zipEntry)
Initialize the new instance from the given zip file entry. |
|
| Method Summary | |
|---|---|
java.io.File |
asFile()
Returns the file this info objects describes or null if it is inside an archive. |
FileLocator |
asFileLocator()
Returns a FileLocator that corresponds to the file specified by this FileInfo object. |
java.lang.String |
getArchiveName()
Returns the name of the archive, the file is included in or null if the file is located in the normal directory structure. |
java.lang.String |
getFullName()
Returns the path + name of the file. |
java.lang.String |
getLocation()
Returns the full location name, that is in case of a normal file the path and filename combined. |
java.lang.String |
getName()
Returns the name of the file (without any path). |
java.lang.String |
getPath()
Returns the path (without filename) to the file. |
long |
getSize()
Returns the size of the file in bytes |
boolean |
isInArchive()
Returns the name of the archive, the file is included in or null if the file is located in the normal directory structure. |
long |
lastModified()
Returns the timestamp of the file's last modification |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileInfo(java.io.File file)
public FileInfo(java.lang.String archiveName,
java.util.zip.ZipEntry zipEntry)
| Method Detail |
|---|
public boolean isInArchive()
public java.lang.String getArchiveName()
public java.lang.String getLocation()
public java.lang.String getFullName()
public java.lang.String getPath()
public java.lang.String getName()
public long getSize()
public long lastModified()
public FileLocator asFileLocator()
public java.io.File asFile()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||