(as-relative-path x)
Take an as-file-able thing and return a string if it is a relative path, else IllegalArgumentException.
(require '[clojure.java.io :as io])
; on windows
user> (io/as-relative-path "this/is")
"this\\\\is
user> (io/as-relative-path "c:/code")
IllegalArgumentException c:\\code is not a relative path clojure.java.io/as-relative-path (io.clj:405)