public interface AbstractFileHandle
An AbstractFileHandle provides access to a physical model storage medium. Handles are associated with an AbstractProjectHandle that denotes a resource location of special significance. Relative access paths are resolved with respect to the AbstractProjectHandle. Derived classes such as FileHandle and EclipseFileHandle use java.io.File or org.eclipse.core.resources.IResource as the handler implementation. The FileHandle 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. |
AbstractFileHandle |
getParentFileHandle()
Return the handle of the parent of this handle. |
AbstractProjectHandle |
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()
AbstractFileHandle getParentFileHandle()
AbstractProjectHandle getProjectHandle()
java.lang.String getProjectRelativeName()
org.eclipse.emf.common.util.URI getURI()
java.lang.Object isFile()
java.lang.Object isFolder()
java.lang.Object isProject()