Java 类org.apache.commons.configuration2.io.FileSystem 实例源码

项目:sponge    文件:FallbackBasePathLocationStrategy.java   
@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;
}
项目:yajsw    文件:FilePropertiesConfiguration.java   
@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;
}
项目:yajsw    文件:FilePropertiesConfiguration.java   
public FileSystem getFileSystem()
{
    return _fileSystem;
}