public class EFSExtensionManager extends Object
Modifier and Type | Method and Description |
---|---|
URI |
append(URI baseURI,
String extension)
Creates a new URI with the same components as the baseURI, except that calling
getPathFromURI() on the new URI will return a path that has the extension appended to
the path returned by baseURI.getPathFromURI()
|
URI |
createNewURIFromPath(URI locationOnSameFilesystem,
String path)
Creates a new URI which clones the contents of the original URI, but with the path replaced by the
given path, such that calling getPathFromURI() on the returned URI will return the given path.
|
static EFSExtensionManager |
getDefault() |
URI |
getLinkedURI(URI locationURI)
In the case of a virtual filesystem, where URIs in the given filesystem are just soft links in EFS to
URIs in other filesystems, returns the URI that this URI links to.
|
String |
getMappedPath(URI locationURI)
For filesystems that map the path to a physical file in one filesystem (say on a remote machine) to
another path (say, on the local machine), this method returns the path that the store maps to.
|
String |
getPathFromURI(URI locationURI)
If the EFS store represented by locationURI is backed by a physical file, gets the path corresponding
to the underlying file.
|
boolean |
isVirtual(URI locationURI)
Returns true if the given URI is part of a virtual filesystem and thus points to another underlying
URI.
|
public static EFSExtensionManager getDefault()
public String getPathFromURI(URI locationURI)
Path
object. This
method will return the corresponding path regardless of whether or not the EFS store actually exists.locationURI
- null
if there is an error or if the store
is not backed by a physical file.public URI getLinkedURI(URI locationURI)
locationURI
- null
on error.public URI createNewURIFromPath(URI locationOnSameFilesystem, String path)
locationOnSameFilesystem
- path
- null
on errorpublic String getMappedPath(URI locationURI)
null
on error.public boolean isVirtual(URI locationURI)
locationURI
- public URI append(URI baseURI, String extension)
baseURI
- extension
- null
on error.Copyright (c) IBM Corp. and others 2004, 2020. All Rights Reserved.