|
Eclipse Platform Release 3.2 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A file info is a simple structure holding information about a file or directory. The information contained here is static; changes to this object will not cause corresponding changes to any file on disk, and changes to files on disk are not reflected in this object. At best, an IFileInfo represents a snapshot of the state of a file at a particular moment in time.
This interface is not intended to be implemented by clients. File store
implementations should use the concrete class FileStore
IFileStore.fetchInfo(int, IProgressMonitor)
,
IFileStore.putInfo(IFileInfo, int, IProgressMonitor)
Method Summary | |
---|---|
boolean |
exists()
Returns whether this file or directory exists. |
boolean |
getAttribute(int attribute)
Returns the value of the specified attribute for this file. |
long |
getLastModified()
Returns the last modified time for this file, or EFS.NONE
if the file does not exist or the last modified time could not be computed.
|
long |
getLength()
Returns the length of this file, or EFS.NONE
if the file does not exist, is a directory, or the length could not be computed. |
String |
getName()
Returns the name of this file. |
boolean |
isDirectory()
Returns whether this file is a directory, or false if this
file does not exist. |
void |
setAttribute(int attribute,
boolean value)
Sets the value of the specified attribute for this file info. |
void |
setLastModified(long time)
Sets the last modified time for this file. |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Method Detail |
public boolean exists()
true
if this file exists, and false
otherwise.public boolean getAttribute(int attribute)
EFS#ATTRIBUTE_*
constants. Returns false
if this file does not exist,
could not be accessed, or the provided attribute does not apply to this
file system.
attribute
- The attribute to retrieve the value for
IFileSystem.attributes()
public long getLastModified()
EFS.NONE
if the file does not exist or the last modified time could not be computed.
The time is represented as the number of Universal Time (UT) milliseconds since the epoch (00:00:00 GMT, January 1, 1970).
EFS.NONE
public long getLength()
EFS.NONE
if the file does not exist, is a directory, or the length could not be computed.
EFS.NONE
public String getName()
public boolean isDirectory()
false
if this
file does not exist.
true
if this file is a directory, and false
otherwise.public void setAttribute(int attribute, boolean value)
EFS#ATTRIBUTE_*
constants.
Note that not all attributes are applicable in a given file system.
Users must call IFileStore.putInfo(IFileInfo, int, IProgressMonitor)
before changes made to this info take effect in an underlying file.
attribute
- The attribute to set the value forvalue
- the value of the specified attribute for this file.IFileSystem.attributes()
public void setLastModified(long time)
EFS.NONE
indicates the file does not exist or the last modified time could not be computed.
Users must call IFileStore.putInfo(IFileInfo, int, IProgressMonitor)
before changes made to this info take effect in an underlying file.
time
- the last modified time for this file, or EFS.NONE
|
Eclipse Platform Release 3.2 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.