|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IFileState
A previous state of a file stored in the workspace's local history.
Certain methods for updating, deleting, or moving a file cause the "before" contents of the file to be copied to an internal area of the workspace called the local history area thus providing a limited history of earlier states of a file.
Moving or copying a file will cause a copy of its local history to appear at the new location as well as at the original location. Subsequent changes to either file will only affect the local history of the file changed. Deleting a file and creating another one at the same path does not affect the history. If the original file had history, that same history will be available for the new one.
The local history does not track resource properties. File states are volatile; the platform does not guarantee that a certain state will always be in the local history.
File state objects implement the IAdaptable interface;
extensions are managed by the platform's adapter manager.
IFile,
IStorage,
Platform.getAdapterManager()| Method Summary | |
|---|---|
boolean |
exists()
Returns whether this file state still exists in the local history. |
java.io.InputStream |
getContents()
Returns an open input stream on the contents of this file state. |
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. |
boolean |
isReadOnly()
Returns whether this file state is read-only. |
| Methods inherited from interface org.eclipse.core.resources.IEncodedStorage |
|---|
getCharset |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
|---|
getAdapter |
| Method Detail |
|---|
boolean exists()
true if this state exists, and false
if it does not
java.io.InputStream getContents()
throws CoreException
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 IStorageCoreException - if this method fails. Reasons include:
IPath getFullPath()
IStorage
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 IStoragenull if none.IResource.getFullPath(),
IStorage.getFullPath()long getModificationTime()
Note that is used only to give the user a general idea of how old this file state is.
java.lang.String getName()
IStorage
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 IStoragenull if this storage has no nameIResource.getName(),
IStorage.getName()boolean isReadOnly()
IStorage method restricts IFileStates to
always be read-only.
isReadOnly in interface IStoragetrue if this storage is read-onlyIStorage
|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.