code: public static String getPathItemId(Container cnt, String path) {
  
          for (String id : Arrays.asList(path, CmsFileUtil.toggleTrailingSeparator(path))) {
              if (cnt.containsId(id)) {
                  return id;
              }
          }
          return null;
      }
docs: Gives item id from path.<p>
  
  @param cnt to be used
  @param path to obtain item id from
  @return item id