view src/rlm/sanitize_file.clj @ 9:1065e7d615a4 tip

deactivate some cruft.
author Robert McIntyre <rlm@mit.edu>
date Mon, 08 Jul 2013 12:51:12 -0400
parents 78a630e650d2
children
line wrap: on
line source
1 (ns rlm.sanitize-file
2 (:import java.io.File)
3 (:use clojure.contrib.str-utils))
6 (defn sanitize-file-name
7 "given a file name, convert it into a valid file name.
8 currently only works for linux"
9 [#^String name]
10 ;; as far as I know, all that must be done is removal of the
11 ;; path separator.
13 (re-gsub
14 (re-pattern (str File/separatorChar))
15 " " ;; replace "/" with " "
16 name))