Package com.caucho.vfs

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


    String staticName = mangledName + ".static";
    String dependName = mangledName + ".depend";

    Path staticPath = getClassDir().lookup(staticName);

    if (! staticPath.canRead())
      return null;

    Path dependPath = getClassDir().lookup(dependName);

    if (! dependPath.canRead())
View Full Code Here


    if (! staticPath.canRead())
      return null;

    Path dependPath = getClassDir().lookup(dependName);

    if (! dependPath.canRead())
      return null;

    try {
      ArrayList<Depend> dependList = StaticPage.parseDepend(dependPath);
View Full Code Here

   */
  private void parsePersistenceConfig(Path root)
  {
    Path persistenceXml = root.lookup("META-INF/persistence.xml");

    if (! persistenceXml.canRead())
      return;

    persistenceXml.setUserPath(persistenceXml.getURL());

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

    } catch (Throwable e) {
      log.log(Level.FINER, e.toString(), e);
    }

    Path classPath = getWorkPath().lookup(className.replace('.', '/') + ".class");
    if (! classPath.canRead())
      throw new ClassNotFoundException("can't find compiled XSL `" + className + "'");

    DynamicClassLoader loader;
    loader = SimpleLoader.create(parentLoader, getWorkPath(), className);
View Full Code Here

  dynLoader.addLoader(new CompilingLoader(dynLoader, appDir.lookup("WEB-INF/classes")));
  dynLoader.addLoader(new DirectoryLoader(dynLoader, appDir.lookup("WEB-INF/lib")));

  Path webXml = appDir.lookup("WEB-INF/web.xml");

  if (webXml.canRead()) {
    try {
      new Config().configureBean(app, webXml);
    } catch (Exception e) {
      log.log(Level.WARNING, e.toString(), e);
    }
View Full Code Here

    String realPath = request.getRealPath(servletPath);

    Path path = Vfs.lookup().lookup(realPath);

    if (! path.canRead() || path.isDirectory()) {
      response.sendError(HttpServletResponse.SC_NOT_FOUND);
      return;
    }

    response.setContentType("text/html");
View Full Code Here

    if (root.getURL().endsWith(".jar"))
      root = JarPath.create(root);

    // XXX: ejb/0fbn
    Path ejbJar = root.lookup("META-INF/ejb-jar.xml");
    if (ejbJar.canRead())
      getConfigManager().addEjbPath(ejbJar);

    _ejbUrls.add(root.getURL());
  }
View Full Code Here

  public boolean apc_compile_file(Env env, StringValue name)
  {
    try {
      Path path = env.lookup(name);
     
      if (path != null && path.canRead()) {
        env.getQuercus().parse(path);
     
        return true;
      }
    } catch (IOException e) {
View Full Code Here

    String realPath = getServletContext().getRealPath(scriptPath);

    Path vfsPath = Vfs.lookup(realPath);

    if (! vfsPath.canRead() || vfsPath.isDirectory()) {
      if (log.isLoggable(Level.FINE))
        log.fine(L.l("script '{0}' is unreadable", vfsPath));

      res.sendError(res.SC_NOT_FOUND);
View Full Code Here

    Path path = Vfs.lookup(realPath);

    if (log.isLoggable(Level.FINER))
      log.finer(L.l("real-path is `{0}'", path));

    if (path.canRead() && ! path.isDirectory())
      return fullPath.length();

    int tail = fullPath.length();
    int head;
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.