code: protected String convertToFolderName(String key) {
      // Strips the slash if it is the end of the key string. This is because the slash at
      // the end of the string is not part of the Object key.
      key = CommonUtils.stripSuffixIfPresent(key, PATH_SEPARATOR);
      return key + getFolderSuffix();
    }
docs: Appends the directory suffix to the key.
  
  @param key the key to convert
  @return key as a directory path