diff options
author | Linus Nordberg <linus@nordu.net> | 2017-01-12 23:33:06 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2017-01-12 23:36:17 +0100 |
commit | 2fa46317bdd4da077d932c58a150cecf08248be2 (patch) | |
tree | 769cd139f42f7ac11d4332dd311d2398f8a533a3 /src/atomic.erl | |
parent | 23d2582f327a4ad99bb9aa0539317d49a79c6751 (diff) |
Update copyright headers.
Diffstat (limited to 'src/atomic.erl')
-rw-r--r-- | src/atomic.erl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/atomic.erl b/src/atomic.erl index 36fba81..580fd17 100644 --- a/src/atomic.erl +++ b/src/atomic.erl @@ -2,7 +2,7 @@ %%% See LICENSE for licensing information. -module(atomic). --export([replacefile/2, readfile/1]). +-export([replacefile/2, readfile/1, openfile/2, readline/1]). -spec replacefile(string(), binary()) -> ok. replacefile(Path, Content) -> @@ -20,3 +20,9 @@ readfile(Path) -> {error, Error} -> util:exit_with_error(readfile, Error, "Error reading file") end. + +openfile(Path, Modes) -> + file:open(Path, Modes). + +readline(IoDevice) -> + file:read_line(IoDevice). |