|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.gmf.runtime.common.ui.util.FileUtil
This class provides general methods for operating on files.
| Constructor Summary | |
FileUtil()
|
|
| Method Summary | |
static void |
createFile(IFile fileHandle,
java.io.InputStream contents,
IProgressMonitor monitor)
Creates a file resource given the file handle and contents. |
static void |
deleteFile(IFile fileHandle,
IProgressMonitor monitor)
Deletes a file resource given the file handle. |
static java.lang.String |
getAbsolutePath(java.lang.String strurlPath,
java.lang.String strmodelPath)
make the absolute path from relative url path and base model path |
static java.lang.String |
getRelativePath(java.lang.String urlPathstr,
java.lang.String modelPathstr)
Build the relative path according to the url path and model path |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FileUtil()
| Method Detail |
public static void createFile(IFile fileHandle,
java.io.InputStream contents,
IProgressMonitor monitor)
throws CoreException
fileHandle - the file handle to create a file resource withcontents - the initial contents of the new file resource, or
null if none (equivalent to an empty stream)monitor - the progress monitor to show visual progress with
CoreException - if the operation fails
public static void deleteFile(IFile fileHandle,
IProgressMonitor monitor)
throws CoreException
fileHandle - the file handle to delete.monitor - the progress monitor to show visual progress with
CoreException - if the operation fails
public static java.lang.String getRelativePath(java.lang.String urlPathstr,
java.lang.String modelPathstr)
urlPathstr - the url path, make sure the url is a file path, otherwise do
not change.modelPathstr - the model's path
public static java.lang.String getAbsolutePath(java.lang.String strurlPath,
java.lang.String strmodelPath)
strurlPath - the URL Path StringstrmodelPath - the absolute Model Path
|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.