Examples of canRead()


Examples of java.io.File.canRead()

        return super.close();
    }

    boolean loadLayout() throws IOException {
        File file = getLayoutFile();
        if (file != null && file.canRead()) {
            Assert.isTrue(SwingUtilities.isEventDispatchThread());
            Assert.isTrue(rootComponent.isVisible());

            FileInputStream inputStream = new FileInputStream(file);
View Full Code Here

Examples of java.io.File.canRead()

        PdfIndirectReference refFileLength;
        try {
            refFileLength = writer.getPdfIndirectReference();
            if (fileStore == null) {
                File file = new File(filePath);
                if (file.canRead()) {
                    in = new FileInputStream(filePath);
                }
                else {
                    if (filePath.startsWith("file:/") || filePath.startsWith("http://") || filePath.startsWith("https://") || filePath.startsWith("jar:")) {
                        in = new URL(filePath).openStream();
View Full Code Here

Examples of java.io.File.canRead()

            final String msg = CorePlugin.Util.getString("FileUtils.Unable_to_write_file_in", dirPath); //$NON-NLS-1$           
            throw new TeiidException(msg);
        }

        //test if file can be read
        if (!tmpFile.canRead()) {
            final String msg = CorePlugin.Util.getString("FileUtils.Unable_to_read_file_in", dirPath); //$NON-NLS-1$           
            throw new TeiidException(msg);
        }

        //test if file can be renamed
View Full Code Here

Examples of java.io.File.canRead()

   
    for ( String s: locations ){
     
      File f = new File( s, name );
     
      if ( f.exists() && f.canRead()){
       
        return( f.getAbsolutePath());
      }
    }
   
View Full Code Here

Examples of java.io.File.canRead()

    String name )
  {
    final String[] locations = { "/bin", "/usr/bin" };
    for ( String s: locations ){
        File f = new File( s, name );
        if ( f.exists() && f.canRead()){
            return( f.getAbsolutePath());
        }
    }
    return( name );
  }
View Full Code Here

Examples of java.io.File.canRead()

    if ( canonical_file.isDirectory()){

      return( false );
    }

    if ( canonical_file.canRead()){

      String str = canonical_file.toString().toLowerCase();

      int  pos = str.lastIndexOf( "." );
View Full Code Here

Examples of java.io.File.canRead()

        }
        if (dirname.equals("")) {
          return new LogisimFileChooser();
        } else {
          File dir = new File(dirname);
          if (dir.canRead()) {
            return new LogisimFileChooser(dir);
          }
        }
      } catch (RuntimeException t) {
        if (first == null) first = t;
View Full Code Here

Examples of java.io.File.canRead()

          aFileType = "d";
        else if (aFile.isFile())
          aFileType = "-";
        else
          aFileType = "?";
        String aFileRead = (aFile.canRead() ? "r" : "-");
        String aFileWrite = (aFile.canWrite() ? "w" : "-");
        String aFileExe = "-";
        if (canExecute != null)
          try {
            if (((Boolean) canExecute.invoke(aFile, Utils.EMPTY_OBJECTS)).booleanValue())
View Full Code Here

Examples of java.io.File.canRead()

      throws IOException {

  List<QueryTest> queries = null;
//  Map<String, Object> queries = new HashMap<String, Object>();
  File queryFile = new File(queryFileName);
  if (!queryFile.exists() || !queryFile.canRead()) {
      String msg = "Query file doesn't exist or cannot be read: " + queryFileName + ", ignoring and continuing";
      TestLogger.log(msg);
      throw new TransactionRuntimeException(msg); //$NON-NLS-1$ //$NON-NLS-2$
  }
      // Get query set name
View Full Code Here

Examples of java.io.File.canRead()

    if (in != null)
    {
      return in;
    }
    final File f = new File(name);
    if (f.canRead())
    {
      return f.toURL();
    }
    return 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.