aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2010-06-08 17:02:00 +0200
committerPatrik Nyblom <[email protected]>2010-06-08 17:02:00 +0200
commitda0e7065b9b051eaebe737e0a22b16eefa7ce101 (patch)
tree33c3ec8a3334f05d15edbaf64513b17e66e3e773
parentaf15e8bd5bdf976b232e6515cf3cca4200b6120b (diff)
downloadotp-da0e7065b9b051eaebe737e0a22b16eefa7ce101.tar.gz
otp-da0e7065b9b051eaebe737e0a22b16eefa7ce101.tar.bz2
otp-da0e7065b9b051eaebe737e0a22b16eefa7ce101.zip
Change typespecs for file.erl to match reality
-rw-r--r--lib/kernel/src/file.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/kernel/src/file.erl b/lib/kernel/src/file.erl
index cfdd7045bd..cffe4e3db5 100644
--- a/lib/kernel/src/file.erl
+++ b/lib/kernel/src/file.erl
@@ -369,7 +369,7 @@ advise(#file_descriptor{module = Module} = Handle, Offset, Length, Advise) ->
advise(_, _, _, _) ->
{error, badarg}.
--spec read(File :: io_device(), Size :: non_neg_integer()) ->
+-spec read(File :: io_device() | atom(), Size :: non_neg_integer()) ->
'eof' | {'ok', [char()] | binary()} | {'error', posix()}.
read(File, Sz) when (is_pid(File) orelse is_atom(File)), is_integer(Sz), Sz >= 0 ->
@@ -385,7 +385,7 @@ read(#file_descriptor{module = Module} = Handle, Sz)
read(_, _) ->
{error, badarg}.
--spec read_line(File :: io_device()) ->
+-spec read_line(File :: io_device() | atom()) ->
'eof' | {'ok', [char()] | binary()} | {'error', posix()}.
read_line(File) when (is_pid(File) orelse is_atom(File)) ->
@@ -439,7 +439,7 @@ pread(#file_descriptor{module = Module} = Handle, Offs, Sz)
pread(_, _, _) ->
{error, badarg}.
--spec write(File :: io_device(), Byte :: iodata()) ->
+-spec write(File :: io_device() | atom(), Byte :: iodata()) ->
'ok' | {'error', posix()}.
write(File, Bytes) when (is_pid(File) orelse is_atom(File)) ->