diff options
author | Kostis Sagonas <[email protected]> | 2010-02-14 17:08:05 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-03-07 13:26:35 +0100 |
commit | 8fef4ffec7245102407ccf73afb5c5c4a42a4ee3 (patch) | |
tree | b82ef911624292f28bbf9cf480dd9ae98e099dfd /lib/kernel/src/file.erl | |
parent | da70b2b0eca09f572e3275240ba60f1da6b679c4 (diff) | |
download | otp-8fef4ffec7245102407ccf73afb5c5c4a42a4ee3.tar.gz otp-8fef4ffec7245102407ccf73afb5c5c4a42a4ee3.tar.bz2 otp-8fef4ffec7245102407ccf73afb5c5c4a42a4ee3.zip |
file.hrl: Move out type declarations
Having various type declarations in the file.hrl file was once upon a time
necessary since the system could not really handle remote types. Now it can
and these declarations should not be there but appear in file.erl instead.
This means that files that need to use these types can refer to them using
a remote type reference, and not having to include file.hrl - at least not
for this reason.
Diffstat (limited to 'lib/kernel/src/file.erl')
-rw-r--r-- | lib/kernel/src/file.erl | 9 |
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 |