Skip to content

Instantly share code, notes, and snippets.

@nipra
Created July 15, 2010 18:06
Show Gist options
  • Save nipra/477294 to your computer and use it in GitHub Desktop.
Save nipra/477294 to your computer and use it in GitHub Desktop.
user> (def *files* (file-seq (java.io.File. "/tmp")))
#'user/*files*
user> (def *f* (first *files*))
#'user/*f*
user> *f*
#<File /tmp>
user> (.isFile *f*)
false
user> (.isDirectory *f*)
true
user> (clojure.pprint/pprint (bean *f*))
{:path "/tmp",
:parent "/",
:hidden false,
:parentFile #<File />,
:canonicalFile #<File /tmp>,
:freeSpace 23946657792,
:absoluteFile #<File /tmp>,
:class java.io.File,
:name "tmp",
:absolutePath "/tmp",
:directory true,
:usableSpace 22446784512,
:canonicalPath "/tmp",
:absolute true,
:totalSpace 29526716416,
:file false}
nil
user>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment