Havvy
Havvy

Reputation: 1511

Open file at absolute location in Clojure

I have a file at C:/tasklists.xml.

What would be a function that returns the text of this file?

Upvotes: 4

Views: 107

Answers (1)

Gert
Gert

Reputation: 3859

You'll want to use slurp (ClojureDocs):

(slurp "C:\\tasklists.xml")
;; => returns string with contents of file

Upvotes: 8

Related Questions