private String getRelativePath(VFSItem item) { String path = ""; while (item != null && !isSameAsRootContainer(item)) { path = "/" + item.getName() + path; item = item.getParentContainer(); } return path; }
private File reversedOriginFile(VFSItem versionXml) { String path = File.separatorChar + versionXml.getName().substring(0, versionXml.getName().length() - 4); for (VFSContainer parent = versionXml.getParentContainer(); parent != null && !parent.isSame(getRootVersionsContainer()); parent = parent.getParentContainer()) { path = File.separatorChar + parent.getName() + path; } return new File(getCanonicalRoot(), path); }
private boolean isVersioned(VFSItem item) { if (item == null) return false; VFSContainer parent = item.getParentContainer(); return FolderConfig.versionsEnabled(parent); }