public class ResourceTools
extends java.lang.Object
| Constructor and Description |
|---|
ResourceTools() |
| Modifier and Type | Method and Description |
|---|---|
static IFile |
getExistingFile(java.lang.String project,
java.lang.String file)
This method returns null if the file does not exist.
|
static IFile |
getFile(java.lang.String project,
java.lang.String file)
Note that the file may or may not exist.
|
static IFile |
getFile(java.lang.String project,
java.lang.String folder,
java.lang.String file) |
static java.lang.String |
getFileLocation(IFile file)
Returns location of file in file system
(e.g.
|
static java.lang.String |
getFileLocation(IProject prj,
java.lang.String path)
Returns location of project in file system (e.g.
|
static IFolder |
getFolder(java.lang.String project,
java.lang.String file)
Note that the folder may or may not exist.
|
static java.lang.String |
getLocation(IPath path)
Returns location as OS path.
|
static IProject |
getProject(java.lang.String project) |
static java.lang.String |
getProjectLocation(IProject prj)
Returns project location as OS path.
|
static IProject[] |
getProjects() |
static java.lang.String |
getWorkspaceLocation()
Returns location of workspace in file system (e.g.
|
static IWorkspaceRoot |
getWorkspaceRoot() |
public static java.lang.String getLocation(IPath path)
path - public static IWorkspaceRoot getWorkspaceRoot()
public static java.lang.String getWorkspaceLocation()
public static IProject[] getProjects()
public static IProject getProject(java.lang.String project)
public static java.lang.String getProjectLocation(IProject prj)
prj - projectpublic static java.lang.String getFileLocation(IFile file)
file - public static java.lang.String getFileLocation(IProject prj,
java.lang.String path)
prj - path - public static IFile getFile(java.lang.String project,
java.lang.String file)
project - file - public static IFolder getFolder(java.lang.String project,
java.lang.String file)
project - file - public static IFile getExistingFile(java.lang.String project,
java.lang.String file)
project - file - public static IFile getFile(java.lang.String project,
java.lang.String folder,
java.lang.String file)