Package com.caucho.vfs

Examples of com.caucho.vfs.Path.canRead()


      path = Vfs.lookup(realPath);

      if (log.isLoggable(Level.FINEST))
        log.finest(L.l("trying script path {0}", path));

      if (path.canRead() && ! path.isDirectory())
  return head;

      tail = head - 1;
    }
View Full Code Here


      if (font != null)
        return font;

      Path path = env.lookupPwd(fontPath);

      if (path.canRead()) {
        ReadStream is = path.openRead();

        try {
          font = Font.createFont(Font.TRUETYPE_FONT, is);
        } finally {
View Full Code Here

          path = env.lookupPwd(item);

          start = len;
        }

        if (path.canRead()) {
          ReadStream is = path.openRead();

          try {
            font = Font.createFont(Font.TRUETYPE_FONT, is);
          } finally {
View Full Code Here

      Path implicitTld = _jspPath.lookup(_jspPath.getParent() + "/implicit.tld");

      // jsp/10h4
      taglib.setJspVersion("2.0");
     
      if (implicitTld.canRead()) {
  Config config = new Config();
  ImplicitTld tldTaglib = new ImplicitTld();

  config.configure(tldTaglib, implicitTld);
View Full Code Here

      Path archivePath = archiveDirectory.lookup(archiveName);

      String entryName = null;
     
      if (! archivePath.canRead())
        continue;
      else
  entryName = archiveNameToEntryName(archiveName);

      if (entryName != null) {
View Full Code Here

      if (appDirPath == null)
  appDirPath = "./" + matcher.group(0);
     
      appDir = PathBuilder.lookupPath(appDirPath, varMap);

      if (! appDir.isDirectory() || ! appDir.canRead()) {
  return null;
      }
    } catch (Exception e) {
      log.log(Level.FINER, e.toString(), e);
     
View Full Code Here

  {
    Path rootDirectory = getRootDirectory();
    Path path = rootDirectory.lookupNative(getRealPath(uripath));

    try {
      if (path.canRead())
        return path.openRead();
      else
        return null;
    } catch (IOException e) {
      log.log(Level.FINEST, e.toString(), e);
View Full Code Here

     
      URL url = loader.getResource(href);

      if (url != null) {
        Path newPath = Vfs.getPwd().lookup(url.toString());
        if (newPath.canRead())
    path = newPath;
      }
    }
   
    Source source;
View Full Code Here

  @Override
  public String findLibrary(String name)
  {
    Path path = _libexec.lookup("lib" + name + ".so");

    if (path.canRead()) {
      return path.getNativePath();
    }
   
    path = _libexec.lookup("lib" + name + ".jnilib");
View Full Code Here

      return path.getNativePath();
    }
   
    path = _libexec.lookup("lib" + name + ".jnilib");

    if (path.canRead()) {
      return path.getNativePath();
    }

    return super.findLibrary(name);
  }
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.