; Exclude arc, or anyone can see source.  Need to use a separate dir.

(def static-filetype (sym)
  (let fname (string sym)
    (and (~find #\/ fname)
         (case (last (check (tokens fname #\.) ~single))
           "gif"  'gif
           "jpg"  'jpg
           "css"  'text/html
           "txt"  'text/html
           "html" 'text/html
           ))))

From srv.arc ©