Examples of FilenameFilter


Examples of java.io.FilenameFilter

    }

    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

Examples of java.io.FilenameFilter

        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");
            }})) {
          System.out.println("Loading process from file system: " + subfile.getName());
          kbuilder.add(ResourceFactory.newFileResource(subfile), ResourceType.BPMN2);
View Full Code Here

Examples of java.io.FilenameFilter

        File classesDir = new File(componentDir, "classes");
        if (classesDir.exists()) {
            list.add(classesDir.toURL());
        }
        File libDir = new File(componentDir, "lib");
        File[] jars = libDir.listFiles(new FilenameFilter() {
            public boolean accept(File dir, String name) {
                return name.endsWith(".jar") || name.endsWith(".zip");
            }
        });
        if (jars != null) {
View Full Code Here

Examples of java.io.FilenameFilter

      // no deployment with this version yet
      createDeployment(DEFAULT_DEPLOYMENT_NAME, defaultWGAWar, monitor, true);
    }
   
    // add default plugins to default deployment
    File[] plugins = WGADesignerPlugin.getDefault().getWgaDefaultPluginsDir().listFiles(new FilenameFilter() {
      public boolean accept(File dir, String name) {
        return name.endsWith(".wgaplugin");
      }     
    });
    for (File pluginFile : plugins) {
View Full Code Here

Examples of java.io.FilenameFilter

  public File getDefaultPluginsDir() {
    return _defaultPluginsDir;
  }
 
  public List<File> getDefaultPluginFiles() {
    File[] pluginFiles = getDefaultPluginsDir().listFiles(new FilenameFilter() {

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

Examples of java.io.FilenameFilter

            loc = "./";
        }
        File f = new File(loc);

        if (f.exists() && f.isDirectory()) {
            FilenameFilter filter = new FilenameFilter() {
                public boolean accept(File dir, String name) {
                    if (name.toLowerCase().endsWith(".xsd")
                        && !new File(dir.getPath() + File.separator + name).isDirectory()) {
                        return true;
                    }
View Full Code Here

Examples of java.io.FilenameFilter

    private ComponentClassLoader createClassLoader() throws JBIException {
       
        try {
           
            File root = new File(ctx.getInstallRoot());
            File[] jars = root.listFiles(new FilenameFilter() {
                public boolean accept(File f, String name) {
                    return name.endsWith(".jar");
                }
            });
           
View Full Code Here

Examples of java.io.FilenameFilter

    String[] children = dir.list();
    if (children == null) {
      // Either dir does not exist or is not a directory
    } else {
 
      FilenameFilter filter = new FilenameFilter() {
        public boolean accept(File dir, String name) {
          return name.endsWith(".xml");
        }
      };
      children = dir.list(filter);
View Full Code Here

Examples of java.io.FilenameFilter

            }
           
            /**
             * Retrieve a directory listing with a filename filter
             */
            FilenameFilter filter = new FilenameFilter()
            {
                final String[] filteredReports =
                {
                        "cvs",
                        "integration.html",
View Full Code Here

Examples of java.io.FilenameFilter

        }

        final Pattern toMatch = Pattern
          .compile(dirToProcess.replaceAll("\\\\\\\\", "\\\\"));

        File[] matches = directory.listFiles(new FilenameFilter() {
          public boolean accept(File arg0, String arg1) {
            return toMatch.matcher(arg1).matches();
          }
        });
        if (matches == null || matches.length == 0)
          return null;

        directory = matches[0];

        if (!directory.exists())
          return null;

      } // End process directory information
    }
    // Last step check if the given file can be found in this directory
    String filenameToLookFor = expandBrackets(fileParts[fileParts.length - 1], entry, database);

    final Pattern toMatch = Pattern.compile("^"
      + filenameToLookFor.replaceAll("\\\\\\\\", "\\\\") + "$");

    File[] matches = directory.listFiles(new FilenameFilter() {
      public boolean accept(File arg0, String arg1) {
        return toMatch.matcher(arg1).matches();
      }
    });
    if (matches == null || matches.length == 0)
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.