Package com.caucho.vfs

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


    if (root.getFullPath().endsWith("WEB-INF/classes/")
        && ! persistenceXml.canRead()) {
      persistenceXml = root.lookup("../persistence.xml");
    }

    if (! persistenceXml.canRead())
      return;

    persistenceXml.setUserPath(persistenceXml.getURL());

    if (log.isLoggable(Level.FINE))
View Full Code Here


    Path classPath = getClassDir().lookup(className.replace('.', '/') +
                                          ".class");

    loadPage(page, config, null, uri);

    if (classPath.canRead())
      page._caucho_addDepend(classPath.createDepend());

    return page;
  }
View Full Code Here

      JarPath jar = JarPath.create(path);
      manifestPath = jar.lookup("META-INF/MANIFEST.MF");
      contextPath = path.getParent();
    }

    if (manifestPath.canRead()) {
      ReadStream is = manifestPath.openRead();
      try {
        Manifest manifest = new Manifest(is);

        Attributes main = manifest.getMainAttributes();
View Full Code Here

      if (url.equals(""))
        continue;

      Path jar = pwd.lookup(url);
     
      if (jar.canRead())
        addJar(jar);
    }

    // ejb/0i20, #3601
    _hasNewLoader = true;
View Full Code Here

    for (int i = 0; i < loaders.size(); i++) {
      Loader loader = loaders.get(i);

      Path path = loader.getPath(systemName);

      if (path != null && path.canRead()) {
        return path.getNativePath();
      }
    }

    for (int i = 0; i < _nativePath.size(); i++) {
View Full Code Here

    }

    for (int i = 0; i < _nativePath.size(); i++) {
      Path path = _nativePath.get(i);

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

    return super.findLibrary(name);
  }
View Full Code Here

    for (int i = 0; i < loaders.size(); i++) {
      Loader loader = loaders.get(i);

      Path path = loader.getPath(name);

      if (path != null && path.canRead()) {
        return path;
      }
    }

    return null;
View Full Code Here

        fileName.startsWith("jar:"))
      return getClassPathLastModified(cl);

    Path path = Vfs.lookup(fileName);

    if (path != null && path.canRead())
      return path.getLastModified();
    else
      return 0;
  }
View Full Code Here

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

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

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

    if (path.canRead()) {
      return path.getNativePath();
    }
   
    path = getLibexec().lookup(name + ".dll");
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.