Package org.eclipse.cdt.utils
Class UNCPathConverter
java.lang.Object
org.eclipse.cdt.utils.UNCPathConverter
Base class for the UNC path conversion extension point. UNC paths are used to represent remote
include locations, and this class is used to translate between UNC, IPath and URI
representations. By default, paths are translated into the equivalent local file version to
preserve existing behavior, but by providing an appropriate extension, these paths can be mapped
into locations on a remote system.
May be subclassed by clients.
- Since:
- 5.3
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic UNCPathConverter
Get the instance of the class that combines the registered converters.static boolean
Test if the string path is in UNC format.static org.eclipse.core.runtime.IPath
Convert a URI to an IPath.abstract URI
Convert a string path to a URIabstract URI
toURI
(org.eclipse.core.runtime.IPath path) Convert an IPath to a URI.
-
Constructor Details
-
UNCPathConverter
public UNCPathConverter()
-
-
Method Details
-
getInstance
Get the instance of the class that combines the registered converters.- Returns:
- instance of UNCPathConverter
-
isUNC
Test if the string path is in UNC format.- Parameters:
path
- path to test- Returns:
- true if the path is in UNC format, false otherwise
-
toPath
Convert a URI to an IPath. Resolves to local path if possible, including using EFS where required.- Parameters:
uri
- URI to convert to an IPath- Returns:
- IPath representation of the URI
-
toURI
Convert an IPath to a URI.- Parameters:
path
- path to convert- Returns:
- URI representation of the IPath
-
toURI
Convert a string path to a URI- Parameters:
path
- path to convert- Returns:
- URI representation of the path
-