aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2010-06-09 13:09:59 +0000
committerErlang/OTP <[email protected]>2010-06-09 13:09:59 +0000
commit1abc9cd1b2b8c1172e5fac67ba85fa512cf55210 (patch)
treeecbec95df621506443f043b435fe790bb8372ee7 /lib
parentb834904a7c0793e831531f0877a102544145fec0 (diff)
parentda0e7065b9b051eaebe737e0a22b16eefa7ce101 (diff)
downloadotp-1abc9cd1b2b8c1172e5fac67ba85fa512cf55210.tar.gz
otp-1abc9cd1b2b8c1172e5fac67ba85fa512cf55210.tar.bz2
otp-1abc9cd1b2b8c1172e5fac67ba85fa512cf55210.zip
Merge branch 'pan/otp_8698_file_typespecs' into dev
* pan/otp_8698_file_typespecs: Change typespecs for file.erl to match reality
Diffstat (limited to 'lib')
-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)) ->