@Override public URL locate(FileSystem fileSystem, FileLocator locator) { locatedUrl = baseStrategy.locate(fileSystem, locator); if (locatedUrl != null) { return locatedUrl; } locatedUrl = fallbackBasePath != null ? FileLocatorUtils.DEFAULT_LOCATION_STRATEGY.locate(fileSystem, FileLocatorUtils.fileLocator(locator).basePath(fallbackBasePath).create()) : null; return locatedUrl; }
@Override public URL locate(FileSystem fileSystem, FileLocator locator) { try { FileObject file = VFSUtils.resolveFile(_fileName); String base = VFSUtils.isLocal(file) ? new File(_fileName).getParent() : file.getParent().getURL().toString(); return VFSUtils.resolveFile(base, locator.getFileName()).getURL(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; }
public FileSystem getFileSystem() { return _fileSystem; }