public class EclipseFileHandle extends org.eclipse.core.runtime.PlatformObject implements FileHandle
| Modifier and Type | Field and Description |
|---|---|
protected EclipseProjectHandle |
projectHandle |
protected org.eclipse.core.resources.IResource |
resource |
| Modifier | Constructor and Description |
|---|---|
|
EclipseFileHandle(EclipseProjectHandle projectHandle,
org.eclipse.core.resources.IResource resource) |
protected |
EclipseFileHandle(org.eclipse.core.resources.IProject project) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
EclipseFileHandle |
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.core.runtime.IPath |
getProjectRelativePath() |
org.eclipse.core.resources.IResource |
getResource() |
org.eclipse.emf.common.util.URI |
getURI()
Get the URI of the file.
|
org.eclipse.core.resources.IFile |
isFile()
Return a non-null file object if this Handle applies to a file.
|
org.eclipse.core.resources.IFolder |
isFolder()
Return a non-null folder object if this Handle applies to a folder or directory.
|
org.eclipse.core.resources.IProject |
isProject()
Return a non-null project object if this Handle applies to a project.
|
java.lang.String |
toString() |
protected final EclipseProjectHandle projectHandle
protected final org.eclipse.core.resources.IResource resource
protected EclipseFileHandle(org.eclipse.core.resources.IProject project)
public EclipseFileHandle(EclipseProjectHandle projectHandle, org.eclipse.core.resources.IResource resource)
public boolean exists()
FileHandleexists in interface FileHandlepublic java.lang.String getAbsoluteName()
FileHandlegetAbsoluteName in interface FileHandlepublic java.io.InputStream getContents()
throws org.eclipse.core.runtime.CoreException
FileHandlegetContents in interface FileHandleorg.eclipse.core.runtime.CoreException - if Eclipse resource access problempublic java.lang.String getName()
FileHandlegetName in interface FileHandlepublic EclipseFileHandle getParentFileHandle()
FileHandlegetParentFileHandle in interface FileHandlepublic ProjectHandle getProjectHandle()
FileHandlegetProjectHandle in interface FileHandlepublic java.lang.String getProjectRelativeName()
FileHandlegetProjectRelativeName in interface FileHandlepublic org.eclipse.core.runtime.IPath getProjectRelativePath()
public org.eclipse.core.resources.IResource getResource()
public org.eclipse.emf.common.util.URI getURI()
FileHandlegetURI in interface FileHandlepublic org.eclipse.core.resources.IFile isFile()
FileHandleisFile in interface FileHandlepublic org.eclipse.core.resources.IFolder isFolder()
FileHandleisFolder in interface FileHandlepublic org.eclipse.core.resources.IProject isProject()
FileHandleisProject in interface FileHandlepublic java.lang.String toString()
toString in class java.lang.Object