diff options
author | Magnus Ahltorp <map@kth.se> | 2014-10-27 01:15:20 +0100 |
---|---|---|
committer | Magnus Ahltorp <map@kth.se> | 2014-10-27 01:15:20 +0100 |
commit | dc8952f6fefc91e21bacf125f5414edf0d35db55 (patch) | |
tree | 3d3dd57bbc17265073148cae3b52cbf06e3675c8 | |
parent | ebc9d5bac1a69ba25044a73674b8e9ea18217f60 (diff) |
Correct function specifications.
-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). |