W3C home > Mailing lists > Public > www-jigsaw@w3.org > May to June 1998

URI to File translation code?

From: Chris Hubick <maillist@chris.hubick.com>
Date: Mon, 29 Jun 1998 16:18:17 -0400 (EDT)
To: www-jigsaw@w3.org
Message-ID: <Pine.LNX.3.96.980629131040.16891B-100000@chris.hubick.com>

	I need the following function and I thought I should check if the
Jigsaw team had implemented it already?

public static File translate(File wwwRoot, File file, String uri) {
  // wwwRoot is a directory - the root of the web server, ie "c:\inetpub\wwroot\" or under unix "/usr/local/etc/httpd/wwwRoot/"
  // file is a file on the web server, ie "c:\inetpub\wwroot\cochrane\cdsr\reviews\G01@001\body.jdf" or under unix "/usr/local/etc/httpd/wwwRoot/cochrane/cdsr/reviews/G01@001/body.jdf"
  // inside this file is a uri, an address of another document on the same web server which I need translated to a file name.  For example, for the file above:
  // the uri "../../default.jdf" would return "c:\inetpub\wwwroot\cochrane\cdsr\default.jdf"
  // the uri "/default.jdf" would return "c:\inetpub\wwwroot\default.jdf"
  // the uri "main.jdf" would return "c:\inetpub\wwroot\cochrane\cdsr\reviews\G01@001\main.jdf"
  // the uri "test/test.jdf" would return "c:\inetpub\wwroot\cochrane\cdsr\reviews\G01@001\test\test.jdf"
}

	Much Thanks for any leads!

---
Chris Hubick
mailto:chris@hubick.com
http://www.hubick.com/
Received on Monday, 29 June 1998 18:48:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:27 GMT