throws ConfigurationException
{
try
{
FileSystemManager manager = VFS.getManager();
FileName path;
if (basePath != null)
{
FileName base = manager.resolveURI(basePath);
path = manager.resolveName(base, fileName);
}
else
{
FileName file = manager.resolveURI(fileName);
FileName base = file.getParent();
path = manager.resolveName(base, file.getBaseName());
}
FileSystemOptions opts = getOptions(path.getScheme());
FileObject file = (opts == null) ? manager.resolveFile(path.getURI())
: manager.resolveFile(path.getURI(), opts);