code: @NonNull
    public static File[] listAllFiles(File directory) {
      if (directory == null) {
        return new File[0];
      }
      File[] files = directory.listFiles();
      return files != null ? files : new File[0];
    }
docs: Return list of all files in the directory.
  
  @param directory target directory on file system
  @return list of files in the directory or empty list if directory is empty.