     (binary-file? f) :binary
     (archive-file? f) :archive
     :else :unknown))
+
+(defn from-name [name]
+  (cond
+    (= "TEXT" (upper-case name)) :text
+    (= "BINARY" (upper-case name)) :binary
+    (= "ARCHIVE" (upper-case name)) :archive
+    :else :unknown))

  (:import (java.io File))
  (:require [clojure.java.io :as io])
  (:use [clojure.set :only (union)]
        [clojure.string :only (split)]
        [clojure.xml :only (parse)]
        [cljsearch.fileutil :only (expand-path get-ext)]))


;;; ############################################################################
;;;
;;; filetypes.clj
;;;
;;; Utility functions for getting file extension and determining file type
;;;
