Puppet Function: extlib::path_join
- Defined in:
- functions/path_join.pp
- Function type:
- Puppet Language
Summary
Take one or more paths and join them togetherOverview
This function will format a windows paths into equivalent unix like paths. This type of unix like path should work on windows.
11 12 13 14 15 16 17 18 19 |
# File 'functions/path_join.pp', line 11
function extlib::path_join(Variant[String, Array[String]] *$dirs) >> Stdlib::Absolutepath {
[$dirs].flatten.map |$index, $dir| {
$index ? {
# only allow paths in the first element (should we enforce this more strictly?)
0 => extlib::dir_clean($dir),
default => $dir,
}
}.join('/')
}
|