Example #1
0
 protected static String makeRelative(String contentHome, String fullPath) {
   if ((fullPath == null || fullPath.length() == 0 || fullPath.equals(contentHome))) {
     return "";
   }
   String normalized = FileUtil.getAbsolutePath(fullPath).replace("\\", "/");
   try {
     return FileUtil.getRelativePath(normalized, contentHome, "/");
   } catch (Exception ex) {
     return null;
   }
 }