Package com.caucho.vfs

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


      setMainClass(mainClass);

      Path appClient = _clientJar.lookup("META-INF/application-client.xml");

      if (appClient.canRead())
  new Config().configureBean(EntAppClient.this, appClient);
    }
   
    /**
     * Adds a new connector
View Full Code Here


    String resourcePath = loader.getResourcePathSpecificFirst();
    stylePath.addClassPath(resourcePath);
   
    Path hrefPath = stylePath.lookup(href);

    if (hrefPath.canRead()) {
      DynamicClassLoader owningLoader = getStylesheetLoader(href, hrefPath);

      if (owningLoader != null) {
  loader = owningLoader;
 
View Full Code Here

    MergePath mergePath = new MergePath();
    mergePath.addClassPath();

    Path path = mergePath.lookup("com/caucho/quercus/lib/pdf/font/" + name + ".afm");

    if (! path.canRead())
      throw new FileNotFoundException(L.l("Can't find font {0}", name));

    _is = path.openRead();

    try {
View Full Code Here

      if (value.length() > 0 && value.charAt(0) == '@') {
        StringValue fileName = value.substring(1);
       
        Path path = env.lookup(fileName);
       
        if (path == null || ! path.canRead()) {
          env.warning(L.l("cannot read file '{0}'", fileName));
          return false;
        }
       
        _postItems.add(new PathEntry(env, key.toString(), path));
View Full Code Here

      if (! rarName.endsWith(".rar"))
        continue;

      Path path = rarDir.lookup(rarName);

      if (! path.canRead())
        continue;

      appName = rarName.substring(0, rarName.length() - 4);

      if (CauchoSystem.isCaseInsensitive())
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

  {
    Path appDir = _webApp.getAppDir();
    String realPath = _webApp.getRealPath(pathName);
    Path path = appDir.lookupNative(realPath);

    if (path.isFile() && path.canRead())
      return path;

    java.net.URL url;
    ClassLoader loader = _webApp.getClassLoader();
    if (loader != null) {
View Full Code Here

      if (url != null && (name.endsWith(".jar") || name.endsWith(".zip")))
        path = JarPath.create(Vfs.lookup(url.toString())).lookup(pathName);
      else if (url != null)
        path = Vfs.lookup(url.toString());

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

    url = ClassLoader.getSystemResource(pathName);
    String name = url != null ? url.toString() : null;
View Full Code Here

    if (url != null && (name.endsWith(".jar") || name.endsWith(".zip")))
      path = JarPath.create(Vfs.lookup(url.toString())).lookup(pathName);
    else if (url != null)
      path = Vfs.lookup(url.toString());

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

      addJars((DynamicClassLoader) loader, _rootDir);
      addNative((DynamicClassLoader) loader, _rootDir);
     
      Path raXml = _rootDir.lookup("META-INF/ra.xml");

      if (! raXml.canRead())
  throw new ConfigException(L.l("missing ra.xml for rar {0}.  .rar files require a META-INF/ra.xml file.",
              _rarPath));

      _config = new ConnectorConfig();
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.