Skip to content

Commit

Permalink
Added read function with expand-home-dir.
Browse files Browse the repository at this point in the history
  • Loading branch information
oubiwann committed Aug 16, 2023
1 parent 0ae9a17 commit ff9d938
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lutil-file.lfe
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
(`#(ok ,dir) dir)
(err err)))

(defun read (filename)
(case (file:read_file (expand-home-dir filename))
(`#(ok ,bytes) bytes)
(err err)))

(defun relative-dir (dir)
"Get the absolute path to directory relative to the current working dir."
(filename:join `(,(cwd) ,dir)))
Expand Down

0 comments on commit ff9d938

Please sign in to comment.