aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/doc/src/code.xml
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2016-09-28 16:40:19 +0200
committerSiri Hansen <[email protected]>2016-09-28 16:57:59 +0200
commit714570912d678c10f4aa4b6a6692d958e0fc7fe7 (patch)
treede2d7c9bb558355224e58714d8ce82c49447c411 /lib/kernel/doc/src/code.xml
parentdabc6644991a6e732dc4404433215d1333a0ea07 (diff)
downloadotp-714570912d678c10f4aa4b6a6692d958e0fc7fe7.tar.gz
otp-714570912d678c10f4aa4b6a6692d958e0fc7fe7.tar.bz2
otp-714570912d678c10f4aa4b6a6692d958e0fc7fe7.zip
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.
Diffstat (limited to 'lib/kernel/doc/src/code.xml')
-rw-r--r--lib/kernel/doc/src/code.xml11
1 files changed, 8 insertions, 3 deletions
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",
<name name="add_pathsa" arity="1"/>
<fsummary>Add directories to the beginning of the code path.</fsummary>
<desc>
- <p>Adds the directories in <c><anno>Dirs</anno></c> to the beginning of
- the code path. If a <c><anno>Dir</anno></c> exists, it is removed
- from the old position in the code path.</p>
+ <p>Traverses <c><anno>Dirs</anno></c> and adds
+ each <c><anno>Dir</anno></c> to the beginning of the code
+ path. This means that the order of <c><anno>Dirs</anno></c>
+ is reversed in the resulting code path. For example, if you
+ add <c>[Dir1,Dir2]</c>, the resulting path will
+ be <c>[Dir2,Dir1|OldCodePath]</c>.</p>
+ <p>If a <c><anno>Dir</anno></c> already exists in the code
+ path, it is removed from the old position.</p>
<p>Always returns <c>ok</c>, regardless of the validity of each
individual <c><anno>Dir</anno></c>.</p>
</desc>