(last (split-filepath s)))
+ "Given a partial or complete file path, split into filename and extension and
+ (let [f (pick-filename s)
+ (= 1 sfc) (conj sfe "")
+ (and (= 2 sfc) (empty? sf1)) [(str "." sf2) ""]
+ :else [(sr/join "." (drop-last sfe)) (last sfe)])))
+(defn ^String pick-filename-name
+ "Given a filepath, return the filename (without extension) portion from it."
+ (first (split-filename s)))
+(defn ^String pick-filename-ext
+ "Given a filepath, return the file extension portion from it."
+ (last (split-filename s)))
"Convert to verbose string - useful for diagnostics and error messages. Like
as-string, but distinguishes nil as \"<nil>\".