Package java.io

Examples of java.io.File.canExecute()


        }
        if (!tmpDir.isDirectory()) {
            throw new RuntimeException("Startup failed: java.io.tmpdir [" + tmpDir.getAbsolutePath()
                + "] is not a directory");
        }
        if (!tmpDir.canRead() || !tmpDir.canExecute()) {
            throw new RuntimeException("Startup failed: java.io.tmpdir [" + tmpDir.getAbsolutePath()
                + "] is not readable");
        }
        if (!tmpDir.canWrite()) {
            throw new RuntimeException("Startup failed: java.io.tmpdir [" + tmpDir.getAbsolutePath()
View Full Code Here


        }
        if (!tmpDir.isDirectory()) {
            throw new RuntimeException("Startup failed: java.io.tmpdir [" + tmpDir.getAbsolutePath()
                + "] is not a directory");
        }
        if (!tmpDir.canRead() || !tmpDir.canExecute()) {
            throw new RuntimeException("Startup failed: java.io.tmpdir [" + tmpDir.getAbsolutePath()
                + "] is not readable");
        }
        if (!tmpDir.canWrite()) {
            throw new RuntimeException("Startup failed: java.io.tmpdir [" + tmpDir.getAbsolutePath()
View Full Code Here

                errors.add("Start script '" + startScriptFile + "' is not a regular file.");
            } else {
                if (!startScriptFile.canRead()) {
                    errors.add("Start script '" + startScriptFile + "' is not readable.");
                }
                if (!startScriptFile.canExecute()) {
                    errors.add("Start script '" + startScriptFile + "' is not executable.");
                }
            }
        }
View Full Code Here

        for (String dataDir : dirs)
        {
            logger.debug("Checking directory {}", dataDir);
            File dir = new File(dataDir);
            if (dir.exists())
                assert dir.isDirectory() && dir.canRead() && dir.canWrite() && dir.canExecute()
                    : String.format("Directory %s is not accessible.", dataDir);
        }

        // Migrate sstables from pre-#2749 to the correct location
        if (Directories.sstablesNeedsMigration())
View Full Code Here

        for (String dataDir : dirs)
        {
            logger.debug("Checking directory {}", dataDir);
            File dir = new File(dataDir);
            if (dir.exists())
                assert dir.isDirectory() && dir.canRead() && dir.canWrite() && dir.canExecute()
                    : String.format("Directory %s is not accessible.", dataDir);
        }

        // Migrate sstables from pre-#2749 to the correct location
        if (Directories.sstablesNeedsMigration())
View Full Code Here

   
    File testFile = new File(_mplayerPath);
   
    if ((testFile.exists()) &&
      (testFile.isFile()) &&
      (testFile.canExecute())) {
      result = true;
    } else {
      result = false;
    }
   
View Full Code Here

    }
  }
 
  private boolean validateMPlayerPath(String value) {
    File file = new File(value);
    if (file.exists() && file.isFile() && file.canExecute())
      return true;
    else
      return false;
  }
 
View Full Code Here

        if (!b1 || !b2 || !b3 || !b4 || !b5 || !b6) {
            System.err.println("Warning: Can't secure the directory " + homeDir +
                    ". Results= " + b1 + ' ' + b2 + ' ' + b3 + ' ' + b4 + ' ' + b5 + ' ' + b6);
        }

        if (!homeDir.canRead() || !homeDir.canWrite() || !homeDir.canExecute()) {
            System.err.println("Warning: Can't access the directory " + homeDir +
                    " fully. This may result in other error messages. read=" +
                    homeDir.canRead() + " write=" + homeDir.canWrite() + " exec=" + homeDir.canExecute());
        }
View Full Code Here

        }

        if (!homeDir.canRead() || !homeDir.canWrite() || !homeDir.canExecute()) {
            System.err.println("Warning: Can't access the directory " + homeDir +
                    " fully. This may result in other error messages. read=" +
                    homeDir.canRead() + " write=" + homeDir.canWrite() + " exec=" + homeDir.canExecute());
        }

        File logDir = new File(Global.LOG_DIR);
        if (!logDir.exists()) {
            logDir.mkdirs();
View Full Code Here

 
  @Test
  public void testLoadTableHTML(){
    File body = new File(testFilePath,"table01.html");
    assumeThat(body.isFile(),is(true));
    assumeThat(body.canExecute(),is(true));
    String bodyHtml = loadHTMLFile(body);
    assumeThat(bodyHtml,notNullValue());
    Document doc = Jsoup.parseBodyFragment(bodyHtml);
    assertTrue(doc!=null);
   
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.