|
||||||||||
| 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 IFileStatetrue if this state exists, and false
if it does not
public java.lang.String getCharset()
throws org.eclipse.core.runtime.CoreException
IEncodedStoragenull 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 IEncodedStoragenull
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
IFileStateIStorage 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 IFileStategetContents in interface IStorageorg.eclipse.core.runtime.CoreException - if this method fails. Reasons include:
public org.eclipse.core.runtime.IPath getFullPath()
IFileStateIStorage
method specifies that IFileStates always have a
path and that path is the full workspace path of the file represented by this state.
getFullPath in interface IFileStategetFullPath in interface IStoragenull if none.IResource.getFullPath(),
IStorage.getFullPath()public long getModificationTime()
IFileStateNote that is used only to give the user a general idea of how old this file state is.
getModificationTime in interface IFileStatepublic java.lang.String getName()
IFileStateIStorage
method specifies that IFileStates 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 IFileStategetName in interface IStoragenull if this storage has no nameIResource.getName(),
IStorage.getName()public UniversalUniqueIdentifier getUUID()
public boolean isReadOnly()
IFileStateIStorage method restricts IFileStates to
always be read-only.
isReadOnly in interface IFileStateisReadOnly in interface IStoragetrue if this storage is read-onlyIStoragepublic 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 | |||||||||