コード例 #1
0
 private String getRelativePath(VFSItem item) {
   String path = "";
   while (item != null && !isSameAsRootContainer(item)) {
     path = "/" + item.getName() + path;
     item = item.getParentContainer();
   }
   return path;
 }
コード例 #2
0
  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);
  }
コード例 #3
0
 private boolean isVersioned(VFSItem item) {
   if (item == null) return false;
   VFSContainer parent = item.getParentContainer();
   return FolderConfig.versionsEnabled(parent);
 }