From 4bd8ab6298961d564c34172c0a4d74cd08a08249 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Wed, 8 Jun 2011 09:23:14 +0200 Subject: Add more specs and types An incorrect spec, rpc:yield/1, has been fixed. --- erts/doc/src/erl_prim_loader.xml | 88 +++++++++++++++------------------------- 1 file changed, 32 insertions(+), 56 deletions(-) (limited to 'erts/doc/src/erl_prim_loader.xml') diff --git a/erts/doc/src/erl_prim_loader.xml b/erts/doc/src/erl_prim_loader.xml index ccaa9b725f..fa3daaeecc 100644 --- a/erts/doc/src/erl_prim_loader.xml +++ b/erts/doc/src/erl_prim_loader.xml @@ -4,7 +4,7 @@
- 19962009 + 19962011 Ericsson AB. All Rights Reserved. @@ -55,33 +55,31 @@ -loader_debug are also experimental

+ + + + + + - start(Id, Loader, Hosts) -> {ok, Pid} | {error, What} + Start the Erlang low level loader - - Id = term() - Loader = atom() | string() - Hosts = [Host] - Host = atom() - Pid = pid() - What = term() -

Starts the Erlang low level loader. This function is called by the init process (and module). The init - process reads the command line flags -id Id, - -loader Loader, and -hosts Hosts. These are + process reads the command line flags -id Id, + -loader Loader, and -hosts Hosts. These are the arguments supplied to the start/3 function.

If -loader is not given, the default loader is efile which tells the system to read from the file system.

-

If -loader is inet, the -id Id, - -hosts Hosts, and -setcookie Cookie flags must - also be supplied. Hosts identifies hosts which this +

If -loader is inet, the -id Id, + -hosts Hosts, and -setcookie Cookie flags must + also be supplied. Hosts identifies hosts which this node can contact in order to load modules. One Erlang runtime system with a erl_boot_server process must be - started on each of hosts given in Hosts in order to + started on each of hosts given in Hosts in order to answer the requests. See erl_boot_server(3).

If -loader is something else, the given port program @@ -90,35 +88,26 @@ - get_file(Filename) -> {ok, Bin, FullName} | error + Get a file - - Filename = string() - Bin = binary() - FullName = string() -

This function fetches a file using the low level loader. - Filename is either an absolute file name or just the name + Filename is either an absolute file name or just the name of the file, for example "lists.beam". If an internal path is set to the loader, this path is used to find the file. If a user supplied loader is used, the path can be stripped off if it is obsolete, and the loader does not use a path. - FullName is the complete name of the fetched file. - Bin is the contents of the file as a binary.

+ FullName is the complete name of the fetched file. + Bin is the contents of the file as a binary.

-

The Filename can also be a file in an archive. For example - /otp/root/lib/mnesia-4.4.7.ez/mnesia-4.4.7/ebin/mnesia_backup.beam +

The Filename can also be a file in an archive. For example + /otp/root/lib/mnesia-4.4.7.ez/mnesia-4.4.7/ebin/mnesia_backup.beam. See code(3) about archive files.

- get_path() -> {ok, Path} + Get the path set in the loader - - Path = [Dir] - Dir = string() -

This function gets the path set in the loader. The path is set by the init process according to information found @@ -126,35 +115,26 @@ - list_dir(Dir) -> {ok, Filenames} | error + List files in a directory - - Dir = name() - Filenames = [Filename] - Filename = string() -

Lists all the files in a directory. Returns - {ok, Filenames} if successful. Otherwise, it returns - error. Filenames is a list of + {ok, Filenames} if successful. Otherwise, it returns + error. Filenames is a list of the names of all the files in the directory. The names are not sorted.

-

The Dir can also be a directory in an archive. For example - /otp/root/lib/mnesia-4.4.7.ez/mnesia-4.4.7/ebin +

The Dir can also be a directory in an archive. For example + /otp/root/lib/mnesia-4.4.7.ez/mnesia-4.4.7/ebin. See code(3) about archive files.

- read_file_info(Filename) -> {ok, FileInfo} | error + Get information about a file - - Filename = name() - FileInfo = #file_info{} -

Retrieves information about a file. Returns - {ok, FileInfo} if successful, otherwise - error. FileInfo is a record + {ok, FileInfo} if successful, otherwise + error. FileInfo is a record file_info, defined in the Kernel include file file.hrl. Include the following directive in the module from which the function is called:

@@ -162,18 +142,14 @@ -include_lib("kernel/include/file.hrl").

See file(3) for more info about the record file_info.

-

The Filename can also be a file in an archive. For example - /otp/root/lib/mnesia-4.4.7.ez/mnesia-4.4.7/ebin/mnesia_backup.beam +

The Filename can also be a file in an archive. For example + /otp/root/lib/mnesia-4.4.7.ez/mnesia-4.4.7/ebin/mnesia_backup.beam. See code(3) about archive files.

- set_path(Path) -> ok + Set the path of the loader - - Path = [Dir] - Dir = string() -

This function sets the path of the loader if init interprets a path command in the start script.

-- cgit v1.2.3