Monday, November 08, 2010 at 12:03 AM.
system.verbs.builtins.html.getFileType
on getFileType (f) { <<Changes <<2/2/07; 9:32:50 AM by DW <<Created. <<A missing bit of functionality. local (ext = string.nthfield (f, ".", string.countfields (f, "."))); local (adr = @user.webserver.prefs.ext2MIME [ext]); if defined (adr^) { return (adr^)} else { return ("")}} <<bundle //test code <<local (f = "Seagate500:Server Backups:static sites:picsScriptingCom:0012:0001.jpg") <<dialog.alert (getFileType (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.