docs: public static String getParentFolder(String resource) {
  
          if (CmsStringUtil.isEmptyOrWhitespaceOnly(resource) || "/".equals(resource)) {
              return null;
          }
          // remove the last char, for a folder this will be "/", for a file it does not matter
          String parent = (resource.substring(0, resource.length() - 1));
          // now as the name does not end with "/", check for the last "/" which is the parent folder name
          return parent.substring(0, parent.lastIndexOf('/') + 1);
      }