Package org.apache.commons.io.filefilter

Examples of org.apache.commons.io.filefilter.WildcardFileFilter


    catch (Exception ex)
    {
      log.warning("classpath directory " + path + " error" + ex.getMessage());
      return result;
    }
    FileFilter fileFilter = new WildcardFileFilter(file);
    File[] thisFiles = fPath.listFiles(fileFilter);
    for (int i = 0; i < thisFiles.length; i++)
    {
      File f = thisFiles[i];
      if (f.exists())
View Full Code Here


    catch (Exception ex)
    {
      log.warning("classpath directory " + path + " error" + ex.getMessage());
      return result;
    }
    FileFilter fileFilter = new WildcardFileFilter(file);
    File[] thisFiles = fPath.listFiles(fileFilter);
    for (int i = 0; i < thisFiles.length; i++)
    {
      File f = thisFiles[i];
      if (f.exists())
View Full Code Here

  
   * @return {@link IOFileFilter} constructed using the wild character. Subclasses can override this method
   * return their own version of {@link IOFileFilter} instance.
   */
  protected IOFileFilter getFileFilter() {
    return new WildcardFileFilter( this.wildCharacter );
  }
View Full Code Here

            }

            if (cl.hasOption(EXCLUDE_CLI)) {
                String[] excludes = cl.getOptionValues(EXCLUDE_CLI);
                if (excludes != null) {
                    final FilenameFilter filter = new NotFileFilter(new WildcardFileFilter(excludes));
                    report.setInputFileFilter(filter);
                }
            }
            else if (cl.hasOption(EXCLUDE_FILE_CLI)) {
                String excludeFileName = cl.getOptionValue(EXCLUDE_FILE_CLI);
View Full Code Here

                String targetDirectory = JavaUtils.ensurePathHasSeparatorAtTheEnd(
                        jarsToDeploy.get(jar).get(classPath));
                String fullClassFileDirectory = FilenameUtils.concat(targetDirectory,
                        FilenameUtils.getFullPath(classPath));
                Collection<File> foundFiles = FileUtils.listFiles(new File(fullClassFileDirectory),
                        new WildcardFileFilter(classNameWildcards), null);
                if (!filesToAdd.containsKey(targetDirectory)) {
                    filesToAdd.put(targetDirectory, new ArrayList<String>());
                }
                for (File file : foundFiles) {
                    filesToAdd.get(targetDirectory).add(file.getAbsolutePath().substring(
View Full Code Here

            File theFile = new File(subDir, fileNames[i]);
            createFile(theFile, fileSizes[i]);
        }

        Collection<File> files = FileUtils.listFiles(subDir,
                                               new WildcardFileFilter("*.*"),
                                               new WildcardFileFilter("*"));

        int count = files.size();
        Object[] fileObjs = files.toArray();

        assertEquals(files.size(), fileNames.length);
View Full Code Here

            File theFile = new File(subDir, fileNames[i]);
            createFile(theFile, fileSizes[i]);
        }

        Iterator<File> files = FileUtils.iterateFiles(subDir,
                                                new WildcardFileFilter("*.*"),
                                                new WildcardFileFilter("*"));

        Map<String, String> foundFileNames = new HashMap<String, String>();

        while (files.hasNext()) {
            boolean found = false;
View Full Code Here

     * Loads the configuration from disk.
     */
    public void load() throws IOException {
        logRecorders.clear();
        File dir = new File(Jenkins.getInstance().getRootDir(), "log");
        File[] files = dir.listFiles((FileFilter)new WildcardFileFilter("*.xml"));
        if(files==null)     return;
        for (File child : files) {
            String name = child.getName();
            name = name.substring(0,name.length()-4);   // cut off ".xml"
            LogRecorder lr = new LogRecorder(name);
View Full Code Here

 
  public SendLogToChainsaw(String directory, String fileNameFilter, String host, int port, Date start, Date end, String regex, String level) throws Exception {
   
    // Set up the file name filter
    if (null != fileNameFilter) {
      fileFilter = new WildcardFileFilter(fileNameFilter);
    } else {
      fileFilter = new WildcardFileFilter("*");
    }
   
    // Get the list of files that match
    File dir = new File(directory);
    if (dir.isDirectory()) {
View Full Code Here

  public SendLogToChainsaw(String directory, String fileNameFilter, String host, int port, Date start, Date end, String regex, String level) throws Exception {

    // Set up the file name filter
    if (null != fileNameFilter) {
      fileFilter = new WildcardFileFilter(fileNameFilter);
    } else {
      fileFilter = new WildcardFileFilter("*");
    }

    // Get the list of files that match
    File dir = new File(directory);
    if (dir.isDirectory()) {
View Full Code Here

TOP

Related Classes of org.apache.commons.io.filefilter.WildcardFileFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.