|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.core.filesystem.provider.FileInfo
This class should be used by file system providers in their implementation
of API methods that return IFileInfo objects.
This class is not intended to be subclassed by clients.
| Constructor Summary | |
|---|---|
FileInfo()
Creates a new file information object with default values. |
|
FileInfo(String name)
Creates a new file information object. |
|
| Method Summary | |
|---|---|
Object |
clone()
|
int |
compareTo(Object o)
|
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. |
String |
getStringAttribute(int attribute)
Returns the value of the specified attribute for 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 |
setDirectory(boolean value)
Sets whether this is a file or directory. |
void |
setExists(boolean value)
Sets whether this file or directory exists. |
void |
setLastModified(long value)
Sets the last modified time for this file. |
void |
setLength(long value)
Sets the length of this file. |
void |
setName(String name)
Sets the name of this file. |
void |
setStringAttribute(int attribute,
String value)
Sets or clears a String attribute, e.g. symbolic link target. |
String |
toString()
For debugging purposes only. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public FileInfo()
public FileInfo(String name)
name - The name of this file| Method Detail |
public Object clone()
public int compareTo(Object o)
compareTo in interface Comparablepublic boolean exists()
IFileInfo
exists in interface IFileInfotrue if this file exists, and false
otherwise.public boolean getAttribute(int attribute)
IFileInfoEFS#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.
getAttribute in interface IFileInfoattribute - The attribute to retrieve the value for
IFileSystem.attributes()public String getStringAttribute(int attribute)
IFileInfoEFS#ATTRIBUTE_*
constants. Returns null if this file does not exist,
could not be accessed, or the provided attribute does not apply to this
file system.
getStringAttribute in interface IFileInfoattribute - The kind of attribute to return. Currently only
EFS.ATTRIBUTE_LINK_TARGET is supported.
IFileSystem.attributes()public long getLastModified()
IFileInfoEFS.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).
getLastModified in interface IFileInfoEFS.NONEpublic long getLength()
IFileInfoEFS.NONE
if the file does not exist, is a directory, or the length could not be computed.
getLength in interface IFileInfoEFS.NONEpublic String getName()
IFileInfo
getName in interface IFileInfopublic boolean isDirectory()
IFileInfofalse if this
file does not exist.
isDirectory in interface IFileInfotrue if this file is a directory, and false
otherwise.
public void setAttribute(int attribute,
boolean value)
IFileInfoEFS#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.
setAttribute in interface IFileInfoattribute - The attribute to set the value forvalue - the value of the specified attribute for this file.IFileSystem.attributes()public void setDirectory(boolean value)
value - true if this is a directory, and false
if this is a file.public void setExists(boolean value)
value - true if this file exists, and false
otherwise.public void setLastModified(long value)
IFileInfoEFS.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.
setLastModified in interface IFileInfovalue - the last modified time for this file, or EFS.NONEpublic void setLength(long value)
EFS.NONE
indicates the file does not exist, is a directory, or the length could not be computed.
value - the length of this file, or EFS.NONEpublic void setName(String name)
name - The file name
public void setStringAttribute(int attribute,
String value)
attribute - The kind of attribute to set. Currently only
EFS.ATTRIBUTE_LINK_TARGET is supported.value - The String attribute, or null to clear
the attributepublic String toString()
|
Eclipse Platform Release 3.3 |
|||||||||||
| 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, 2007. All rights reserved.