Package java.io

Examples of java.io.File.listFiles()


          File[] reps = plugs.listFiles();
          if (reps!=null) for(int j=0; j<reps.length; ++j) {
            if (reps[j].getName().equalsIgnoreCase("jsynoptic")) {
              plugs = reps[j];
              classPaths.add(plugs);
              reps = plugs.listFiles();
              break;
            }
          }
            nativePath = false;
          if (reps!=null) for(int j=0; j<reps.length; ++j) {
View Full Code Here


    String productName = "jsynoptic";
    String home = System.getProperty(productName + ".home", System.getProperty("user.home", ""));
    File file = new File(home, "." + productName);
    if (file.isDirectory()) {
      classPaths.add(file);
        File[] reps = file.listFiles();
        boolean nativePath = false;
        if (reps!=null) for(int j=0; j<reps.length; ++j) {
            File[] maybejars = reps[j].listFiles();
            if (maybejars!=null) {
            boolean native2 = false;
View Full Code Here

      }
      if (!parent.isDirectory()) {
         log.severe("The file '" + parent.getAbsolutePath() + File.pathSeparator + parent.getName() + "' is not a directory");
         return -1;
      }
      File[] childs = parent.listFiles();
      int maxVal = 0;
      for (int i=0; i < childs.length; i++) {
         int val = getIndex(childs[i].getName());
         if (val > maxVal)
            maxVal = val;
View Full Code Here

      File dir = new File(this.initialCmdPath);
      if (!dir.exists())
         throw new Exception("InitialUpdater.getSupportedVersions invoked but the directory '" + this.initialCmdPath + "' does not exist");
      if (!dir.isDirectory())
         throw new Exception("InitialUpdater.getSupportedVersions invoked but '" + this.initialCmdPath + "' is not a directory");
      File[] childs = dir.listFiles();
      TreeSet set = new TreeSet();
      for (int i=0; i < childs.length; i++) {
         if (childs[i].isDirectory())
            continue;
         if (!childs[i].canRead())
View Full Code Here

            final String[] replacementExtensions =
                this.replacementExtensions != null ? this.replacementExtensions.split(",\\s*") : new String[0];
            if (modelSourceDir.exists())
            {
                getLog().info("Copy uml2 resources to " + buildDirectory.getAbsolutePath());
                final File[] modelFiles = modelSourceDir.listFiles();
                for (int ctr = 0; ctr < modelFiles.length; ctr++)
                {
                    final File file = modelFiles[ctr];
                    if (file.isFile() && file.toString().matches(this.modelFilePattern))
                    {
View Full Code Here

            final String[] replacementExtensions =
                this.replacementExtensions != null ? this.replacementExtensions.split(",\\s*") : new String[0];
            if (modelSourceDir.exists())
            {
                getLog().info("Copy xml.zip resources to " + buildDirectory.getAbsolutePath());
                final File[] modelFiles = modelSourceDir.listFiles();
                for (int ctr = 0; ctr < modelFiles.length; ctr++)
                {
                    final File file = modelFiles[ctr];
                    if (file.isFile() && file.toString().matches(this.modelArchivePattern))
                    {
View Full Code Here

                return null;
            }

            // schema and WSDL file should have been created in tmp directory

            File[] generated = tmp.listFiles();
            File schema = null;
            File wsdl = null;
            for (File f : generated) {
                if (f.isFile()) {
                    if (null == wsdl && f.getName().endsWith(".wsdl")) {
View Full Code Here

    while (list_of_dirs.size() != 0) {
      if (work_on_files.stopTraverseDir())
        return;
      current_dir = list_of_dirs.poll();
      if (with_part_met_extension)
        list_of_files = current_dir.listFiles(new FileFilter() {
          public boolean accept(File file) {
            if (file.isDirectory())
              return true;
            if (file.getName().endsWith(PART_MET_EXTENSION))
              return true;
View Full Code Here

            return false;
          }

        });
      else
        list_of_files = current_dir.listFiles();
      for (File file : list_of_files) {
        if (work_on_files.stopTraverseDir())
          return;
        if (file.isDirectory())
          list_of_dirs.offer(file);
View Full Code Here

        while(it.hasNext()){
            URL repositoryURL = (URL)it.next();
            try {
                if ( new File(repositoryURL.getFile()).exists()){
                    File helpDirectory = new File(repositoryURL.getFile());
                    File[] files =  helpDirectory.listFiles();
                    for (int i=0;i<files.length; i++){
                        if (!files[i].getName().endsWith(".class")){ // get all except .class files
                            extractAndCopyFileEntry(files[i]);
                        }
                    }
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.