aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/file.erl
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2010-03-09 06:07:55 +0000
committerErlang/OTP <[email protected]>2010-03-09 06:07:55 +0000
commit36dab22b34d33e1fb8f22af9131d2b33aa97bbd5 (patch)
treeccd9f079beb8413f4b8889dae6827586c175da51 /lib/kernel/src/file.erl
parent02112d8dba5b40cd0adb7ecb2b2ed4340594369f (diff)
parent8fef4ffec7245102407ccf73afb5c5c4a42a4ee3 (diff)
downloadotp-36dab22b34d33e1fb8f22af9131d2b33aa97bbd5.tar.gz
otp-36dab22b34d33e1fb8f22af9131d2b33aa97bbd5.tar.bz2
otp-36dab22b34d33e1fb8f22af9131d2b33aa97bbd5.zip
Merge branch 'ks/types' into dev
* ks/types: file.hrl: Move out type declarations kernel: Add types and specs OTP-8494 ks/types
Diffstat (limited to 'lib/kernel/src/file.erl')
-rw-r--r--lib/kernel/src/file.erl9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/kernel/src/file.erl b/lib/kernel/src/file.erl
index a42771dfb6..46ffa9d708 100644
--- a/lib/kernel/src/file.erl
+++ b/lib/kernel/src/file.erl
@@ -74,15 +74,22 @@
%% data types
-type filename() :: string().
-type file_info() :: #file_info{}.
--type io_device() :: pid() | #file_descriptor{}.
+-type fd() :: #file_descriptor{}.
+-type io_device() :: pid() | fd().
-type location() :: integer() | {'bof', integer()} | {'cur', integer()}
| {'eof', integer()} | 'bof' | 'cur' | 'eof'.
-type mode() :: 'read' | 'write' | 'append' | 'raw' | 'binary' |
{'delayed_write', non_neg_integer(), non_neg_integer()} |
'delayed_write' | {'read_ahead', pos_integer()} |
'read_ahead' | 'compressed'.
+-type name() :: string() | atom() | [name()].
+-type posix() :: atom().
-type bindings() :: any().
+-type date() :: {pos_integer(), pos_integer(), pos_integer()}.
+-type time() :: {non_neg_integer(), non_neg_integer(), non_neg_integer()}.
+-type date_time() :: {date(), time()}.
+
%%%-----------------------------------------------------------------
%%% General functions