Examples of FileFilter


Examples of com.adidas.dam.marvin.client.query.FileFilter

      System.exit(1);
    }
   
    FileFormat format = FileFormat.TIF;
   
      FileFilter imageFilter = FileFilter.create()
          .withFormat(format)
          .withMaxHeight(1000)
          .withMaxWidth(1000)
          .enableClipping();
     
View Full Code Here

Examples of com.google.gwt.dev.util.FileOracleFactory.FileFilter

    }
    scanner.setCaseSensitive(caseSensitive);
    scanner.init();

    // index from this package down
    publicPathEntries.addRootPackage(publicPackage, new FileFilter() {
      public boolean accept(String name) {
        return scanner.match(name);
      }
    });
  }
View Full Code Here

Examples of com.linkedin.databus.core.TrailFilePositionSetter.FileFilter

    final Logger log = Logger.getLogger("TestTrailFilePositionSetter.testTrailFileComparator");
    log.info("starting");

    String prefix = "x4";
    File dir = new File("/tmp");
    FileFilter f = new TrailFilePositionSetter.FileFilter(dir,prefix);

    //isTrailFile Check
    Assert.assertFalse(f.isTrailFile(null),"Null trail file");
    Assert.assertFalse(f.isTrailFile(dir),"Dir as  trail file");
    Assert.assertFalse(f.isTrailFile(new File("")),"Empty trail file name");
    Assert.assertFalse(f.isTrailFile(new File("/tmp/x12222")),"trail file with different prefix");
    Assert.assertFalse(f.isTrailFile(new File("/tmp/42222")),"trail file with different prefix");
    Assert.assertFalse(f.isTrailFile(new File("/tmp/x412222.xml")),"trail file with bad suffix");
    Assert.assertFalse(f.isTrailFile(new File("/tmp/x412222x")),"trail file with bad suffix");
    Assert.assertTrue(f.isTrailFile(new File("/tmp/x4122222")),"correct trail file");
    Assert.assertTrue(f.isTrailFile(new File("x4122222")),"correct trail file");

    //compareTo Check
    Assert.assertEquals(-1, f.compareFileName(new File("/tmp/x400001"), new File("/tmp/x400002")));
    Assert.assertEquals(-1, f.compareFileName(new File("/tmp/x400001"), new File("/tmp/x400002")))// DUPLICATE?
    Assert.assertEquals(1, f.compareFileName(new File("/tmp/x410001"), new File("/tmp/x400002")));
    Assert.assertEquals(1, f.compareFileName(new File("/tmp/x410009"), new File("/tmp/x410003")));
    Assert.assertEquals(0, f.compareFileName(new File("/tmp/x410009"), new File("/tmp/x410009")));

    //isNextFileInSeq
    Assert.assertFalse(f.isNextFileInSequence(new File("/tmp/x400000"), new File("/tmp/x400000")));
    Assert.assertFalse(f.isNextFileInSequence(new File("/tmp/x410000"), new File("/tmp/x400000")));
    Assert.assertFalse(f.isNextFileInSequence(new File("/tmp/x400001"), new File("/tmp/x400000")));
    Assert.assertTrue(f.isNextFileInSequence(new File("/tmp/x400000"), new File("/tmp/x400001")));

    log.info(DONE_STRING);
  }
View Full Code Here

Examples of com.mucommander.commons.file.filter.FileFilter

            CommandManager.registerDefaultCommand(new Command(CommandManager.FILE_OPENER_ALIAS,  FILE_OPENER, CommandType.SYSTEM_COMMAND, null));
            CommandManager.registerDefaultCommand(new Command(CommandManager.URL_OPENER_ALIAS,   FILE_OPENER, CommandType.SYSTEM_COMMAND, null));
            CommandManager.registerDefaultCommand(new Command(CommandManager.EXE_OPENER_ALIAS,   EXE_OPENER,  CommandType.SYSTEM_COMMAND, null));
            CommandManager.registerDefaultCommand(new Command(CommandManager.FILE_MANAGER_ALIAS, FILE_OPENER, CommandType.SYSTEM_COMMAND, FILE_MANAGER_NAME));

            FileFilter filter;
            // Disabled actual permissions checking as this will break normal +x files.
            // With this, a +x PDF file will not be opened.
            /*
            // Identifies which kind of filter should be used to match executable files.
            if(JavaVersion.JAVA_1_6.isCurrentOrHigher())
View Full Code Here

Examples of com.sshtools.ui.FileFilter

    }
   
    private void rebuildFilterSelect() {
        filterSelect.removeAll();
        for(Enumeration e = filters.elements(); e.hasMoreElements(); ) {
            FileFilter f = (FileFilter)e.nextElement();
            filterSelect.add(f.getDescription());
        }
    }
View Full Code Here

Examples of hitune.analysis.mapreduce.processor.FileFilter.FileFilter

            String pattern = conf.get(AnalysisProcessorConfiguration.filefilter_pattern, null);
            StringBuilder str = new StringBuilder();

            for(String path : paths){
                log.debug("path to scan: " + path);
                FileFilter filter = null;
                try {
                    filter = (FileFilter)Class.forName(filterclass).getConstructor(new Class[] { Configuration.class, String.class }).newInstance(new Object[] {conf, pattern});

                    if(str.length()!=0){
                        str.append(FileFilter.SEPARATOR);
                    }
                    str.append(filter.filter(new Path(path)));

                   
                } catch (IllegalArgumentException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
View Full Code Here

Examples of java.io.FileFilter

  private String findAcceptableJavaVersion() {
    try {
      String progDir = System.getenv("ProgramFiles");
   
      if(progDir != null) {
        File[] jres = new File(progDir,"Java").listFiles(new FileFilter() {
          public boolean accept(File pathname) {
            return pathname.getName().toLowerCase().indexOf("jre") != -1;
          }
        });
     
View Full Code Here

Examples of java.io.FileFilter

   * @return ���ض������ʼ�����
   * @throws IOException
   */
  public int read(Session ssn, List mails, List ident, int max_count) throws IOException{
    File fs = new File(path);
    File[] mailfiles = fs.listFiles(new FileFilter(){
      public boolean accept(File f) {
        if(f.length() > 0 && f.getName().endsWith(EML))
          return true;
        return false;
      }});
View Full Code Here

Examples of java.io.FileFilter

    public void xtestCreateCollection() throws DbException {
        DbCollection coll = DbCollection.getRootCollection();
        DbCollection xmark = coll.createCollection(COL_NAME);
        assert (xmark.getDirectory().exists());
        File collDir = coll.getDirectory();
        File[] matchFiles = collDir.listFiles(new FileFilter() {
            public boolean accept(File f) {
                return f.isDirectory() && COL_NAME.equals(f.getName());
            }
        });
        assert (matchFiles.length > 0);
View Full Code Here

Examples of java.io.FileFilter

    return filterArr.toArray(new ProgramFilter[filterArr.size()]);
  }

  private File[] getFilterFiles() {
    return mFilterDirectory.listFiles(new FileFilter() {
      public boolean accept(File f) {
        return f.getAbsolutePath().endsWith(".filter");
      }
    });
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.