diff options
-rw-r--r-- | src/atomic.erl | 2 | ||||
-rw-r--r-- | src/perm.erl | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/atomic.erl b/src/atomic.erl index 5ad48ba..36fba81 100644 --- a/src/atomic.erl +++ b/src/atomic.erl @@ -10,7 +10,7 @@ replacefile(Path, Content) -> util:write_tempfile_and_rename(Path, TempName, Content), util:fsync([Path, filename:dirname(Path)]). --spec readfile(string()) -> binary(). +-spec readfile(string()) -> binary() | noentry. readfile(Path) -> case file:read_file(Path) of {ok, Contents} -> diff --git a/src/perm.erl b/src/perm.erl index c386d08..9f02b55 100644 --- a/src/perm.erl +++ b/src/perm.erl @@ -74,7 +74,7 @@ ensurefile(Rootdir, Key, Content) -> util:exit_with_error(Error, readfile, "Error reading file") end. --spec readfile(string(), binary()) -> binary(). +-spec readfile(string(), binary()) -> binary() | noentry. readfile(Rootdir, Key) -> {_Dirs, Path} = path_for_key(Rootdir, Key), atomic:readfile(Path). |