Skip to content

Instantly share code, notes, and snippets.

@frankhale
Last active December 28, 2015 10:59
Show Gist options
  • Save frankhale/7490602 to your computer and use it in GitHub Desktop.
Save frankhale/7490602 to your computer and use it in GitHub Desktop.
(still learning!) Returns a map of filenames for a series of file paths past in.
;;
;; Part of some learning exercises I'm doing. This returns a map of filenames for a series of file paths passed in
;;
(defn get-filenames-from-paths [& paths]
(map #(-> %
(.getFileName)
(.toString))
(map #(java.nio.file.Paths/get (.toURI (java.io.File. %))) paths)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment