From 714570912d678c10f4aa4b6a6692d958e0fc7fe7 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 28 Sep 2016 16:40:19 +0200 Subject: Document the order of directories added with code:add_pathsa/1 code:add_pathsa/1 reverts the list of directories when adding it at the beginning of the code path. The command line option '-pa' behaves in the same way. This is now documented. --- lib/kernel/doc/src/code.xml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lib/kernel/doc/src') diff --git a/lib/kernel/doc/src/code.xml b/lib/kernel/doc/src/code.xml index 4db377bcde..3143cdc825 100644 --- a/lib/kernel/doc/src/code.xml +++ b/lib/kernel/doc/src/code.xml @@ -382,9 +382,14 @@ zip:create("mnesia-4.4.7.ez", Add directories to the beginning of the code path. -

Adds the directories in Dirs to the beginning of - the code path. If a Dir exists, it is removed - from the old position in the code path.

+

Traverses Dirs and adds + each Dir to the beginning of the code + path. This means that the order of Dirs + is reversed in the resulting code path. For example, if you + add [Dir1,Dir2], the resulting path will + be [Dir2,Dir1|OldCodePath].

+

If a Dir already exists in the code + path, it is removed from the old position.

Always returns ok, regardless of the validity of each individual Dir.

-- cgit v1.2.3