public static Collection getFiles()

in command.line/java/com/jetbrains/teamcity/Util.java [144:163]


  public static Collection<File> getFiles(final File file) {
    if (!file.exists()) {
      throw new IllegalArgumentException(MessageFormat.format("File is not found \"{0}\"", file.getAbsolutePath())); //$NON-NLS-1$
    }
    if (file.length() == 0) {
      throw new IllegalArgumentException(MessageFormat.format("File \"{0}\" is empty", file.getAbsolutePath())); //$NON-NLS-1$	
    }
    try {
      final List<String> content = FileUtil.readFile(file);
      final HashSet<File> files = new HashSet<File>(content.size());
      for (String path : content) {
        if (path.trim().length() > 0) {
          files.addAll(getFiles(path));
        }
      }
      return files;
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }