|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FileHandle
A FileHandle provides access to a physical model storage medium. Handles are associated with an ProjectHandle that denotes a resource location of special significance. Relative access paths are resolved with respect to the ProjectHandle. Derived classes such as JavaFileHandle and EclipseFileHandle use java.io.File or org.eclipse.core.resources.IResource as the handler implementation. The JavaFileHandle is suitable for use in standalone applications. The EclipseFileHandle is suitable for use in Eclipse projects.
Method Summary | |
---|---|
boolean |
exists()
Return true if file exists. |
java.lang.String |
getAbsoluteName()
Return a name that can access the physical storage without reference to any other context. |
java.io.InputStream |
getContents()
Return a stream from which the contents can be read. |
java.lang.String |
getName()
Return a name that can access the physical storage with respect to its parent. |
FileHandle |
getParentFileHandle()
Return the handle of the parent of this handle. |
ProjectHandle |
getProjectHandle()
Return the handle of the project. |
java.lang.String |
getProjectRelativeName()
Return a name that can access the physical storage with respect to the project. |
org.eclipse.emf.common.util.URI |
getURI()
Get the URI of the file. |
java.lang.Object |
isFile()
Return a non-null file object if this Handle applies to a file. |
java.lang.Object |
isFolder()
Return a non-null folder object if this Handle applies to a folder or directory. |
java.lang.Object |
isProject()
Return a non-null project object if this Handle applies to a project. |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
---|
getAdapter |
Method Detail |
---|
boolean exists()
java.lang.String getAbsoluteName()
java.io.InputStream getContents() throws org.eclipse.core.runtime.CoreException, java.io.FileNotFoundException
org.eclipse.core.runtime.CoreException
- if Eclipse resource access problem
java.io.FileNotFoundException
- if File access problemjava.lang.String getName()
FileHandle getParentFileHandle()
ProjectHandle getProjectHandle()
java.lang.String getProjectRelativeName()
org.eclipse.emf.common.util.URI getURI()
java.lang.Object isFile()
java.lang.Object isFolder()
java.lang.Object isProject()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |