Package org.apache.commons.vfs

Examples of org.apache.commons.vfs.FileObject.resolveFile()


            while (restStart < nameLength && name.charAt(restStart) == '/') restStart++;
            if (restStart == nameLength) throw new IllegalArgumentException("Invalid name(" + name + ")");
            String componentName = name.substring(componentNameStart, componentNameEnd);
            URL location = FlexibleLocation.resolveLocation("component://" + componentName + "/.");
            FileObject ofbizBase = getContext().resolveFile(location.toString(), properties);
            return VFSUtil.toFileObject(ofbizBase.getFileSystem().getFileSystemManager(), ofbizBase.resolveFile(name.substring(restStart)).getURL().toString(), properties);
        } catch (Exception e) {
            throw UtilMisc.initCause(new FileSystemException(e.getMessage(), null, e), e);
        }
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.