Package java.io

Examples of java.io.File.listFiles()


                }
                return false;
            }
        };

        File[] modelFiles = modelsDirFile.listFiles(fileFilter);

        return modelFiles;

    }
View Full Code Here


    if (sTorrentFilePath != null && sTorrentFilenames == null) {
      File dir = new File(sTorrentFilePath);
      if (!dir.isDirectory())
        return 0;

      final File[] files = dir.listFiles(new FileFilter() {
        public boolean accept(File arg0) {
          if (FileUtil.getCanonicalFileName(arg0.getName()).endsWith(".torrent"))
            return true;
          if (FileUtil.getCanonicalFileName(arg0.getName()).endsWith(".tor"))
            return true;
View Full Code Here

    return false;
      }
  };

  File[] modelFiles = modelsDirFile.listFiles(fileFilter);

  return modelFiles;

    }
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

      if ( !cache_dir.exists()){
       
        FileUtil.mkdirs(cache_dir);
      }
     
      if ( cache_dir.listFiles().length < MAX_FILES_PER_DIR ){
       
        for (int j=0;j<MAX_FILES_PER_DIR;j++){
         
          long  file = Math.abs(rand.nextLong());
     
View Full Code Here

         {
            return file.getName().endsWith(".jdb");
         }
      }

      File[] files = dir.listFiles(new MyFilter());

      if (files != null)
      {
         for (int i = 0; i < files.length; i += 1)
         {
View Full Code Here

       
        if (!dirname.exists()) {
            dirname.mkdir();
        }
       
        File[] fileList = dirname.listFiles();
        if ((fileList != null) && (fileList.length > 0)) {
            for (File file : fileList) {
                file.delete();
            }
        }
View Full Code Here

        File f = new File(args[0]);
        if (f.exists()) {
            if (f.isFile()) {
                ppm2Jpeg(f);
            } else {
                File[] list = f.listFiles(new FileFilter() {
                    public boolean accept(File pathname) {
                        return pathname.getName().endsWith(".ppm");
                    }
                });
                for (int i = 0; i < list.length; i++) {
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

        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

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.