Created
March 4, 2020 16:30
-
-
Save saidone75/0844f40d5f2d8b129cb7302b7cf40541 to your computer and use it in GitHub Desktop.
Get file creation time in Clojure using java.nio
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn creation-time [file] | |
(.creationTime | |
(java.nio.file.Files/readAttributes | |
(.toPath file) | |
java.nio.file.attribute.BasicFileAttributes | |
(into-array java.nio.file.LinkOption [])))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you very much, I will use your solution from now on!