Package java.io

Examples of java.io.FilenameFilter


            final File buildDirectory = new File( getBuildDirectory() );
            if ( !buildDirectory.exists() )
            {
                buildDirectory.mkdirs();
            }
            File[] files = buildDirectory.listFiles( new FilenameFilter()
            {
                public boolean accept( File dir, String name )
                {
                    if ( dir.equals( buildDirectory ) && snapshotMatch( artifact, name ) )
                    {
View Full Code Here


    private File[] getExtLibs(){
        if (extLibHome == null || !extLibHome.exists()) {
            info("External Libs Home (ext) is null or does not exists.");
            return new File[]{};
        }
        File[] libs = extLibHome.listFiles(new FilenameFilter() {
            public boolean accept(File dir, String name) {
                return (name.endsWith(".jar"));
            }
        });
View Full Code Here

      boolean mkdirs = javatags.mkdirs();
      assert mkdirs == true;
      JapidFlags.info("created: " + japidViews + JAVATAGS);
    }
 
    File[] javafiles = javatags.listFiles(new FilenameFilter() {
      @Override
      public boolean accept(File dir, String name) {
        if (name.endsWith(".java"))
          return true;
        return false;
View Full Code Here

    }

    private Long determineLastFile(File backupDir, final AsyncOperationStatus status) {
        status.setStatus("Determining the last backed up file...");
        System.out.println("Backup directory is \'" + backupDir.getPath() + "\'.");
        File[] backupFiles = backupDir.listFiles(new FilenameFilter() {

            public boolean accept(File dir, String name) {
                if(!name.endsWith(BDB_EXT)) {
                    return false;
                }
View Full Code Here

                } else if (dependencyDirIsStale(dependencyDir)) {
                    cleanDependencyDir(dependencyDir);
                    resolveMavenDependency(dependency, dependencyDir);
                }

                File[] listFiles = dependencyDir.listFiles(new FilenameFilter() {

                    @Override
                    public boolean accept(File dir, String name) {
                        return name.endsWith(".jar");
                    }
View Full Code Here

    for (int i = 0; i < paths.length; i++) {
      fullList.add(paths[i]);
      if (!paths[i].endsWith(".jar")) {
        File dir = new File(paths[i]);
        if (dir.exists() && dir.isDirectory()) {
          String[] jars = dir.list(new FilenameFilter() {
            public boolean accept(File f, String name) {
              if (name.endsWith(".jar")) {
                return true;
              }
              return false;
View Full Code Here

  private void assertNoBlocks(File datanodeDir) {
    File datanodeDataDir = new File(datanodeDir, "data");
    String[] blockFilenames =
        datanodeDataDir.list(
            new FilenameFilter() {
              public boolean accept(File dir, String name){
                return Block.isBlockFilename(new File(dir, name));}});
    // if this fails, the delete did not propagate because either
    //   awaitQuiescence() returned before the disk images were removed
    //   or a real failure was detected.
View Full Code Here

  }

  public void deleteAllFilesRootDir() {
    final File directory = new File(rootDir);
    // Get file ending with .ssf in rootDir
    final File[] files = directory.listFiles(new FilenameFilter() {
      @Override
      public boolean accept(File dir, String name) {
        return name.endsWith(".ssf");
      }
    });
View Full Code Here

  }

  public String[] getGroupIds() {
    final File directory = new File(rootDir);
    // Get file names ending with .ssf in rootDir
    final String[] groupIds = directory.list(new FilenameFilter() {
      @Override
      public boolean accept(File dir, String name) {
        return name.endsWith(".ssf");
      }
    });
View Full Code Here

        File directory = new File(ConfigurationFactory.get(true).getLibraryDirectory());
        logger.log(Level.FINE, "Scanning default library dir {0}", directory.getPath());

        if (directory.isDirectory()) {
            for (File file : directory.listFiles(new FilenameFilter() {
                public boolean accept(File dir, String name) {
                    return name.endsWith(".jar");
                }
            })) {
                logger.log(Level.FINE, "Adding default library {0}", file.getName());
View Full Code Here

TOP

Related Classes of java.io.FilenameFilter

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.