Package com.caucho.vfs

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


      path = JarPath.create(path);
    }

    Path ejbJarXml = path.lookup("META-INF/ejb-jar.xml");

    if (ejbJarXml.canRead()) {
      String ejbJarModuleName = scanEjbJarXml(ejbJarXml);

      if (ejbJarModuleName != null)
        moduleName = ejbJarModuleName;
    }
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().configureRootPath(root);
    }
    else if (root.getURL().endsWith("WEB-INF/classes")) {
      ejbJar = root.lookup("../ejb-jar.xml");
   
View Full Code Here

      getConfigManager().configureRootPath(root);
    }
    else if (root.getURL().endsWith("WEB-INF/classes")) {
      ejbJar = root.lookup("../ejb-jar.xml");
   
      if (ejbJar.canRead()) {
        getConfigManager().configureRootPath(root);
      }
    }

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

   */
  protected void postExtract(boolean isExtract)
    throws IOException
  {
    Path path = getRootDirectory().lookup("META-INF/MANIFEST.MF");
    if (path.canRead()) {
      ReadStream is = path.openRead();
     
      try {
        _manifest = new Manifest(is);
      } catch (IOException e) {
View Full Code Here

    Path archivePath = getArchivePath();

    if (archivePath == null)
      return true;

    if (! archivePath.canRead())
      return true;
   
    String hash = Long.toHexString(archivePath.getCrc64());

    CommitBuilder commit = new CommitBuilder();
View Full Code Here

      String tag = getId();
      String treeHash = _repositorySpi.getTagContentHash(tag);
     
      Path archivePath = getArchivePath();

      if (treeHash != null && archivePath != null && archivePath.canRead()) {
        throw new ConfigException(L.l("{0} cannot be deployed from both an archive {1} and cluster deployment.",
                                      this, archivePath.getNativePath()));
      }

      if (treeHash == null) {
View Full Code Here

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

    try {
      if (path.canRead())
        return path.openRead();
      else {
        String resource = "META-INF/resources" + uripath;

        return getClassLoader().getResourceAsStream(resource);
View Full Code Here

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

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

    CharBuffer cb = new CharBuffer();

    for (int i = 0; i < path.length; i++) {
      Path subpath = Vfs.lookup(path[i]);

      if (subpath.canRead() || subpath.isDirectory()) {
        if (cb.length() > 0)
          cb.append(File.pathSeparatorChar);

        cb.append(path[i]);
      }
View Full Code Here

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

    if (! persistenceXml.canRead())
      return;
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.