rlm@0: (ns rlm.sanitize-file rlm@0: (:import java.io.File) rlm@0: (:use clojure.contrib.str-utils)) rlm@0: rlm@0: rlm@0: (defn sanitize-file-name rlm@0: "given a file name, convert it into a valid file name. rlm@0: currently only works for linux" rlm@0: [#^String name] rlm@0: ;; as far as I know, all that must be done is removal of the rlm@0: ;; path separator. rlm@0: rlm@0: (re-gsub rlm@0: (re-pattern (str File/separatorChar)) rlm@0: " " ;; replace "/" with " " rlm@0: name)) rlm@0: rlm@0: rlm@0: