docs: public static String getName(String resource) {
  
          if ("/".equals(resource)) {
              return "/";
          }
          // 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 resource.substring(parent.lastIndexOf('/') + 1);
      }