auto-build.os.edn-utils
Read an edn file.
read-edn
(read-edn printers edn-filename)
Read edn-filename
and returns a map with: * :filepath
as given as a parameter * :afilepath
file with absolute path * :status
is :success
or :fail
* :raw-content
if file can be read. * :exception
if something wrong happened. * :edn
if the text to edn translation is successful.
That functions print on the cli: * nothing if successful or if printers are nil * an error message and the message of the exception if the file can’t be read.
write-edn
(write-edn edn-filepath printers content)
Spit the content
in the edn file called edn-filename
.
Params: * edn-filepath
Filepath * content
What is spitted Return nil if successful else map with :exception