Package java.io

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


        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

      // 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

  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

            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

    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

    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

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

        }

        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

            System.exit(-1);
        }

        model = new ProfileListModel();

        String list[] = profDir.list(new FilenameFilter() {
            public boolean accept(File dir, String name) {
                if (new File(dir, name).isDirectory()) {
                    return true;
                } else {
                    return false;
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.