Monday, November 08, 2010 at 12:05 AM.


on getFileURL (url) { <<takes a URL and returns a file path
	<<10/31/97 at 8:12:41 AM by DW -- moved from toys.getFileURL
	<<it's an error if it doesn't begin with file:///
	local (f);
	if not (string.lower (url) beginsWith "file:///") {
		scriptError ("This command only works with URLs that begin with file:///.")};
	url = string.delete (url, 1, 8);
	url = string.replaceAll (url, "/", file.getPathChar ());
	f = string.urlDecode (url);
	return (f)}

This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.