JavaScript is disabled on your browser.
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
net.sourceforge.pmd.util

Class FileUtil



  • public final class FileUtil
    extends Object 
    This is a utility class for working with Files.
    • Method Detail

      • getFileNameWithoutExtension

        public static String getFileNameWithoutExtension(String fileName)
        Helper method to get a filename without its extension
        Parameters:
        fileName - String
        Returns:
        String
      • collectFiles

        public static List<DataSource> collectFiles(String fileLocations,
         FilenameFilter filenameFilter)
        Collects a list of DataSources using a comma separated list of input file locations to process. If a file location is a directory, the directory hierarchy will be traversed to look for files. If a file location is a ZIP or Jar the archive will be scanned looking for files. If a file location is a file, it will be used. For each located file, a FilenameFilter is used to decide whether to return a DataSource.
        Parameters:
        fileLocations - A comma-separated list of file locations.
        filenameFilter - The FilenameFilter to apply to files.
        Returns:
        A list of DataSources, one for each file collected.
      • findPatternInFile

        public static boolean findPatternInFile(File file,
         String pattern)
        Handy method to find a certain pattern into a file. While this method lives in the FileUtils, it was designed with with unit test in mind (to check result redirected into a file)
        Parameters:
        file -
        pattern -
        Returns:
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2002-2014 InfoEther. All Rights Reserved.

AltStyle によって変換されたページ (->オリジナル) /