Skip to content

Instantly share code, notes, and snippets.

@sritchie
Created February 2, 2011 21:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sritchie/3148f33f2702b029fe78 to your computer and use it in GitHub Desktop.
Save sritchie/3148f33f2702b029fe78 to your computer and use it in GitHub Desktop.
(defn files-with-names
"Subquery to return all files, along with their filenames."
[dir]
(let [source (hfs-wholefile dir)]
(<- [?filename ?file] (source ?filename ?file))))
(defn all-files
"Subquery to return all files in the supplied directory."
[dir]
(let [source (hfs-wholefile dir)]
(<- [?file] (source ?filename ?file))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment