code: public static String formatLsString(boolean hSize, boolean acl, boolean isFolder, String
        permission,
        String userName, String groupName, long size, long lastModifiedTime, int inAlluxioPercentage,
        String persistenceState, String path, String dateFormatPattern) {
      String inAlluxioState;
      String sizeStr;
      if (isFolder) {
        inAlluxioState = IN_ALLUXIO_STATE_DIR;
        sizeStr = String.valueOf(size);
      } else {
        inAlluxioState = String.format(IN_ALLUXIO_STATE_FILE_FORMAT, inAlluxioPercentage);
        sizeStr = hSize ? FormatUtils.getSizeFromBytes(size) : String.valueOf(size);
      }
  
      if (acl) {
        return String.format(LS_FORMAT, permission, userName, groupName,
            sizeStr, persistenceState, CommonUtils.convertMsToDate(lastModifiedTime,
                dateFormatPattern), inAlluxioState, path);
      } else {
        return String.format(LS_FORMAT_NO_ACL, sizeStr,
            persistenceState, CommonUtils.convertMsToDate(lastModifiedTime, dateFormatPattern),
            inAlluxioState, path);
      }
    }
docs: Formats the ls result string.
  
  @param hSize print human-readable format sizes
  @param acl whether security is enabled
  @param isFolder whether this path is a file or a folder
  @param permission permission string
  @param userName user name
  @param groupName group name
  @param size size of the file in bytes
  @param lastModifiedTime the epoch time in ms when the path is last modified
  @param inAlluxioPercentage whether the file is in Alluxio
  @param persistenceState the persistence state of the file
  @param path path of the file or folder
  @param dateFormatPattern the format to follow when printing dates
  @return the formatted string according to acl and isFolder