code: public static FileStatus toFileStatus(HdfsFileStatus stat, String src) {
      if (stat == null) {
        return null;
      }
      return new FileStatus(stat.getLen(), stat.isDir(), stat.getReplication(),
          stat.getBlockSize(), stat.getModificationTime(),
          stat.getAccessTime(),
          stat.getPermission(), stat.getOwner(), stat.getGroup(),
          stat.getFullPath(new Path(src))); // full path
    }
docs: Convert an HdfsFileStatus to a FileStatus
  @param stat an HdfsFileStatus
  @param src parent path in string representation
  @return a FileStatus object