java.lang.Objectorg.eclipse.core.runtime.PlatformObject
org.eclipse.gmt.umlx.registry.standalone.FileHandle
public class FileHandle
Constructor Summary | |
---|---|
FileHandle(ProjectHandle projectHandle,
java.io.File file)
|
Method Summary | |
---|---|
static java.lang.String |
createCanonicalFileName(java.io.File file)
|
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.io.File |
getFile()
|
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. |
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.core.runtime.IPath |
getProjectRelativePath()
|
org.eclipse.emf.common.util.URI |
getURI()
Get the URI of the file. |
java.io.File |
isFile()
Return a non-null file object if this Handle applies to a file. |
java.io.File |
isFolder()
Return a non-null folder object if this Handle applies to a folder or directory. |
java.io.File |
isProject()
Return a non-null project object if this Handle applies to a project. |
java.lang.String |
toString()
|
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 FileHandle(ProjectHandle projectHandle, java.io.File file) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public static java.lang.String createCanonicalFileName(java.io.File file) throws java.io.IOException
java.io.IOException
public boolean exists()
AbstractFileHandle
exists
in interface AbstractFileHandle
public java.lang.String getAbsoluteName()
AbstractFileHandle
getAbsoluteName
in interface AbstractFileHandle
public java.io.InputStream getContents() throws java.io.FileNotFoundException
AbstractFileHandle
getContents
in interface AbstractFileHandle
java.io.FileNotFoundException
- if File access problempublic java.io.File getFile()
public java.lang.String getName()
AbstractFileHandle
getName
in interface AbstractFileHandle
public FileHandle getParentFileHandle()
AbstractFileHandle
getParentFileHandle
in interface AbstractFileHandle
public AbstractProjectHandle getProjectHandle()
AbstractFileHandle
getProjectHandle
in interface AbstractFileHandle
public java.lang.String getProjectRelativeName()
AbstractFileHandle
getProjectRelativeName
in interface AbstractFileHandle
public org.eclipse.core.runtime.IPath getProjectRelativePath()
public org.eclipse.emf.common.util.URI getURI()
AbstractFileHandle
getURI
in interface AbstractFileHandle
public java.io.File isFile()
AbstractFileHandle
isFile
in interface AbstractFileHandle
public java.io.File isFolder()
AbstractFileHandle
isFolder
in interface AbstractFileHandle
public java.io.File isProject()
AbstractFileHandle
isProject
in interface AbstractFileHandle
public java.lang.String toString()
toString
in class java.lang.Object