code: public static String getParentFolderTokens(String rootPath) {
  
          if (CmsStringUtil.isEmpty(rootPath)) {
              return "/";
          }
          StringBuffer result = new StringBuffer(128);
          String folderName = CmsResource.getFolderPath(rootPath);
          for (int i = 0; i < folderName.length(); i++) {
              char c = folderName.charAt(i);
              if (c == '/') {
                  if (result.length() > 0) {
                      result.append(' ');
                  }
                  result.append(folderName.substring(0, i + 1));
              }
          }
          return result.toString();
      }
docs: Creates a space separated list of all parent folders of the given root path.<p>
  
  @param rootPath the root path to get the parent folder list for
  
  @return a space separated list of all parent folders of the given root path