|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.runtime.PlatformObject
org.eclipse.core.internal.resources.FileState
public class FileState
Constructor Summary | |
---|---|
FileState(IHistoryStore store,
org.eclipse.core.runtime.IPath fullPath,
long lastModified,
UniversalUniqueIdentifier uuid)
|
Method Summary | |
---|---|
boolean |
exists()
Returns whether this file state still exists in the local history. |
java.lang.String |
getCharset()
Returns the name of a charset encoding to be used when decoding this storage's contents into characters. |
java.io.InputStream |
getContents()
Returns an open input stream on the contents of this file state. |
org.eclipse.core.runtime.IPath |
getFullPath()
Returns the full path of this file state. |
long |
getModificationTime()
Returns the modification time of the file. |
java.lang.String |
getName()
Returns the name of this file state. |
UniversalUniqueIdentifier |
getUUID()
|
boolean |
isReadOnly()
Returns whether this file state is read-only. |
java.lang.String |
toString()
Returns a string representation of this object. |
Methods inherited from class org.eclipse.core.runtime.PlatformObject |
---|
getAdapter |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
---|
getAdapter |
Constructor Detail |
---|
public FileState(IHistoryStore store, org.eclipse.core.runtime.IPath fullPath, long lastModified, UniversalUniqueIdentifier uuid)
Method Detail |
---|
public boolean exists()
IFileState
exists
in interface IFileState
true
if this state exists, and false
if it does notpublic java.lang.String getCharset() throws org.eclipse.core.runtime.CoreException
IEncodedStorage
null
if a proper
encoding cannot be determined.
Note that this method does not check whether the result is a supported
charset name. Callers should be prepared to handle
UnsupportedEncodingException
where this charset is used.
getCharset
in interface IEncodedStorage
null
org.eclipse.core.runtime.CoreException
- if an error happens while determining
the charset. See any refinements for more information.IStorage.getContents()
public java.io.InputStream getContents() throws org.eclipse.core.runtime.CoreException
IFileState
IStorage
method returns an open input stream
on the contents this file state represents.
The client is responsible for closing the stream when finished.
getContents
in interface IFileState
getContents
in interface IStorage
org.eclipse.core.runtime.CoreException
- if this method fails. Reasons include:
public org.eclipse.core.runtime.IPath getFullPath()
IFileState
IStorage
method specifies that IFileState
s always have a
path and that path is the full workspace path of the file represented by this state.
getFullPath
in interface IFileState
getFullPath
in interface IStorage
null
if none.IResource.getFullPath()
,
IStorage.getFullPath()
public long getModificationTime()
IFileState
Note that is used only to give the user a general idea of how old this file state is.
getModificationTime
in interface IFileState
public java.lang.String getName()
IFileState
IStorage
method specifies that IFileState
s always have a
name and that name is equivalent to the last segment of the full path
of the resource represented by this state.
getName
in interface IFileState
getName
in interface IStorage
null
if this storage has no nameIResource.getName()
,
IStorage.getName()
public UniversalUniqueIdentifier getUUID()
public boolean isReadOnly()
IFileState
IStorage
method restricts IFileState
s to
always be read-only.
isReadOnly
in interface IFileState
isReadOnly
in interface IStorage
true
if this storage is read-onlyIStorage
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |