<< module.json Modules manager nmm >>

modulepath


Returns path of a module.


Syntax


p = modulepath(module_short_name)
p = modulepath(module_short_name, option)

Input argument


module_short_name or 'nelson'

a string: short module's name. module must exist in nelson session.

option

a string: 'etc', 'bin', 'root', 'builtin', 'tests'.

Output argument


p

a string: path or subpath of the module.

Description


modulepath is an helper's function to return module root path or a subdirectory.

modulepath('nelson') is equivalent to modulepath('nelson', 'root')

modulepath('nelson', 'bin') return path of nelson's executables.

modulepath('nelson', 'builtin') returns path of nelson's dynamic libraries.

Example


modulepath('core')
modulepath('core', 'root')
modulepath('core', 'etc')
modulepath('core', 'bin')
modulepath('core', 'builtin')
modulepath('core', 'tests')
modulepath('nelson', 'root')
modulepath('nelson', 'bin')
modulepath('nelson', 'builtin')

See also


requiremodule, getmodules.

History


Version Description
1.0.0 initial version

Author


Allan CORNET

<< module.json Modules manager nmm >>