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/include/file.hrl | |
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/include/file.hrl')
-rw-r--r-- | lib/kernel/include/file.hrl | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/lib/kernel/include/file.hrl b/lib/kernel/include/file.hrl index c1de4d764d..9279c74eb6 100644 --- a/lib/kernel/include/file.hrl +++ b/lib/kernel/include/file.hrl @@ -21,29 +21,18 @@ -define(FILE_HRL_, 1). %%-------------------------------------------------------------------------- -%%-type namelist() :: [char() | atom() | namelist()]. --type namelist() :: [_]. %% XXX: GROSS OVERAPPROXIMATION -- FIX ME --type name() :: string() | atom() | namelist(). --type posix() :: atom(). - --type date() :: {pos_integer(), pos_integer(), pos_integer()}. --type time() :: {non_neg_integer(), non_neg_integer(), non_neg_integer()}. --type date_time() :: {date(), time()}. - -%%-------------------------------------------------------------------------- - -record(file_info, {size :: non_neg_integer(), % Size of file in bytes. type :: 'device' | 'directory' | 'other' | 'regular' | 'symlink', access :: 'read' | 'write' | 'read_write' | 'none', - atime :: date_time(), % The local time the file was last read: - % {{Year, Mon, Day}, {Hour, Min, Sec}}. - mtime :: date_time(), % The local time the file was last written. - ctime :: date_time(), % The interpretation of this time field - % is dependent on operating system. - % On Unix it is the last time the file or - % or the inode was changed. On Windows, - % it is the creation time. + atime :: file:date_time(), % The local time the file was last read: + % {{Year, Mon, Day}, {Hour, Min, Sec}}. + mtime :: file:date_time(), % The local time the file was last written. + ctime :: file:date_time(), % The interpretation of this time field + % is dependent on operating system. + % On Unix it is the last time the file + % or the inode was changed. On Windows, + % it is the creation time. mode :: integer(), % File permissions. On Windows, % the owner permissions will be % duplicated for group and user. @@ -61,10 +50,8 @@ -record(file_descriptor, - {module :: module(), % Module that handles this kind of file + {module :: module(), % Module that handles this kind of file data :: term()}). % Module dependent data --type fd() :: pid() | #file_descriptor{}. - %%-------------------------------------------------------------------------- -endif. |