code: public Resource addPath(String path)
          throws IOException,MalformedURLException
      {
          FileResource r=null;
  
          if (!isDirectory())
          {
              r=(FileResource)super.addPath(path);
          }
          else
          {
              path = org.browsermob.proxy.jetty.util.URI.canonicalPath(path);
              
              // treat all paths being added as relative
              String rel=path;
              if (path.startsWith("/"))
                  rel = path.substring(1);
              
              File newFile = new File(_file,rel.replace('/', File.separatorChar));
              r=new FileResource(newFile.toURI().toURL(),null,newFile);
          }
          
          String encoded= org.browsermob.proxy.jetty.util.URI.encodePath(path);
          int expected=r._urlString.length()-encoded.length();
          int index = r._urlString.lastIndexOf(encoded, expected);
          
          if (expected!=index && ((expected-1)!=index || path.endsWith("/") || !r.isDirectory()))
          {
              r._alias=r._url;
              r._aliasChecked=true;
          }                   
          return r;
      }
docs: /* --------------------------------------------------------