Package com.caucho.vfs

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


  private void expandRar()
    throws IOException
  {
    Path rar = _rarPath;
   
    if (! rar.canRead())
      return;

    try {
      _rootDir.mkdirs();
    } catch (Throwable e) {
View Full Code Here


    Path expandDir = _rootDir;
    Path tempDir = _rootDir.getParent().lookup(".temp");
    Path dependPath = _rootDir.lookup("META-INF/resin-rar.timestamp");

      // XXX: change to a hash
    if (dependPath.canRead()) {
      ReadStream is = null;
      ObjectInputStream ois = null;
      try {
        is = dependPath.openRead();
        ois = new ObjectInputStream(is);
View Full Code Here

      Path path = Vfs.lookup(realPath);

      Path toc = path.lookup("toc.xml");

      if (toc.canRead()) {
        Config config = new Config();
        config.setEL(false);

        Navigation navigation = new Navigation(this, uri, path, 0);
View Full Code Here

        Path path = Vfs.lookup(realPath);

        Path pwd = path.getParent();
        Path toc = pwd.lookup("toc.xml");

        if (toc.canRead()) {
          Config config = new Config();
          config.setEL(false);

          int p = uri.lastIndexOf('/');
          if (p > 0)
View Full Code Here

      Path path = Vfs.lookup(realPath);

      Path ref = path.lookup("reference.xtp");

      if (ref.canRead()) {
        Config config = new Config();
        config.setEL(false);

        try {
          _referenceDocument =
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

  JarEntry jarEntry = _jarList.get(i);
  Path path = jarEntry.getJarPath();

  Path filePath = path.lookup(pathName);
     
  if (filePath.canRead() && filePath.getLength() > 0) {
    return createEntry(name, pathName, jarEntry, filePath);
  }
      }
    }
View Full Code Here

    StringBuilder lines = new StringBuilder();

    try {
      Path path = Vfs.lookup(_systemId);

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

  lines.append("\n");

  try {
View Full Code Here

  {
    Path path;

    path = getPath(name);

    if (path != null && path.canRead()) {
      try {
        resources.add(new URL(path.getURL()));
      } catch (Exception e) {
      }
    }
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.