Package java.io

Examples of java.io.FilenameFilter


  }

  private List<IClasspathEntry> retrieveClasspathEntries(File directory) {
    List<IClasspathEntry> entryList = new ArrayList<IClasspathEntry>();

    File[] libs = directory.listFiles(new FilenameFilter() {
      public boolean accept(File dir, String name) {
        return name.toLowerCase().endsWith(".jar");
      }     
    });
    if (libs != null) {         
View Full Code Here


  }
 
  public static final List<IClasspathEntry> retrieveClasspathEntries(File directory) {
    List<IClasspathEntry> entryList = new ArrayList<IClasspathEntry>();

    File[] libs = directory.listFiles(new FilenameFilter() {

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

  private String[] getThemePacks(File directory) {
    if (directory == null || !directory.exists()) {
      return new String[0];
    }

    return directory.list(new FilenameFilter() {
       public boolean accept(File dir, String name) {
         return name.toLowerCase().endsWith(".zip");
       }
     });
  }
View Full Code Here

            jarlist.add(new URL("file:" + jar.getAbsolutePath()));
        }

        // add all jar files from the lib/ext directory
        File extdir = new File(libdir, "ext");
        File[] files = extdir.listFiles(new FilenameFilter() {
                public boolean accept(File dir, String name) {
                    String n = name.toLowerCase();
                    return n.endsWith(".jar") || n.endsWith(".zip");
                }
            });
View Full Code Here

    } else {
      File bundleDirectory = new File(URI.create(urlString)).getParentFile();
      //      System.out.println("bundleDirectory: " +
      // bundleDirectory.getAbsolutePath());

      bundles = bundleDirectory.list(new FilenameFilter() {
        public boolean accept(File dir, String name) {
          return name.startsWith(prefix) && name.endsWith(extension);
        }
      });
    }
   
    HashSet bundleSet = new HashSet();
   
    // Add local first
    File localDir = new File(SystemProperties.getUserPath());
    String localBundles[] = localDir.list(new FilenameFilter() {
      public boolean accept(File dir, String name) {
        return name.startsWith(prefix) && name.endsWith(extension);
      }
    });
   
      // can be null if user path is borked
   
    if ( localBundles != null ){
     
      bundleSet.addAll(Arrays.asList(localBundles));
    }
   
    // Add AppDir 2nd
    File appDir = new File(SystemProperties.getApplicationPath());
    String appBundles[] = appDir.list(new FilenameFilter() {
      public boolean accept(File dir, String name) {
        return name.startsWith(prefix) && name.endsWith(extension);
      }
    });
   
View Full Code Here

    if(styles != null)
      return styles;
    StringBuffer path = new StringBuffer(baseStylePath);
    path.append(name);
    File fPath = new File(path.toString());
    String[] css_files = fPath.list(new FilenameFilter() {
      public boolean accept(File dir, String name) {
        return name.endsWith(".css") && !name.startsWith("_");
      }
    });
    styles = new ArrayList();
View Full Code Here

                path = path.append("j2ee13");
            }
            URL librarySetURL = FileLocator.find(bundle, path, null);                       
            try {
                File librarySetsDir = new File(FileLocator.toFileURL(librarySetURL).getPath());
                File[] jars = librarySetsDir.listFiles(new FilenameFilter() {
                   
                    public boolean accept(File dir, String name) {
                        return name.endsWith(".jar");
                    }
                });
View Full Code Here

 
  @NotBound
  public String[] getTomcatLibraryNames() {
    File dir = _wgaRuntime.getCatalinaLibDir().getLocation().toFile();
    String[] names;   
    names = dir.list(new FilenameFilter() {

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

        ProcessBuilderFactory.setProcessBuilderFactoryService(new ProcessBuilderFactoryServiceImpl());
        ProcessMarshallerFactory.setProcessMarshallerFactoryService(new ProcessMarshallerFactoryServiceImpl());
        ProcessRuntimeFactory.setProcessRuntimeFactoryService(new ProcessRuntimeFactoryServiceImpl());
        BPMN2ProcessFactory.setBPMN2ProcessProvider(new BPMN2ProcessProviderImpl());
        KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
        for (File subfile: file.listFiles(new FilenameFilter() {
            public boolean accept(File dir, String name) {
              return name.endsWith(".bpmn") || name.endsWith("bpmn2");
            }})) {
          kbuilder.add(ResourceFactory.newFileResource(subfile), ResourceType.BPMN2);
        }
View Full Code Here

    }

    public void run() {
        try {
            String demosDir = "d:/java/javanet/xhtmlrenderer/demos/browser/xhtml/new";
            File[] files = new File(demosDir).listFiles(new FilenameFilter() {
                public boolean accept(File dir, String name) {
                    return name.endsWith("xhtml");
                }
            });
            for (int i = 0; i < files.length; i++) {
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.