ClojureDocs

Nav

Namespaces

write-file

  • (write-file {:keys [path content string opts], :as params})
Writes a file at path, will create parent dirs if needed. Returns nil.
File contents may be specified either with :content (for data, that
will be pr-str'ed) or with :string for the string to write. If
neither is specified, an empty file is created (like touch).
 Options:
  :path - required, file path
  :content - val to write, will pr-str
  :string - string to write
  :opts - coll of writer opts like :append and :encoding (per clojure.java.io)