<p>This is an Eclipse question, and you can assume the Java package for all these Eclipse classes is <code>org.eclipse.core.resources</code>.  </p>

<p>I want to get an <code>IFile</code> corresponding to a location <code>String</code> I have:</p>

<pre><code> "platform:/resource/Tracbility_All_Supported_lib/processes/gastuff/globalht/GlobalHTInterface.wsdl"
</code></pre>

<p>I have the enclosing <code>IWorkspace</code> and <code>IWorkspaceRoot</code>.  If I had the <code>IPath</code> corresponding to the location above, I could simply call <code>IWorkspaceRoot.getFileForLocation(IPath)</code>.</p>

<p>How do I get the corresponding <code>IPath</code> from the location <code>String</code>?  Or is there some other way to get the corresponding <code>IFile</code>?</p>

```
```
String platformLocationString = portTypeContainer
        .getLocation();
String locationString = platformLocationString
        .substring("platform:/resource/".length());
IWorkspace workspace = ResourcesPlugin.getWorkspace();
IWorkspaceRoot workspaceRoot = workspace.getRoot();
IFile wSDLFile = (IFile) workspaceRoot
        .findMember(locationString);
```
```