Returns a string path built from the array $pathParts. Where a join occurs multiple separators are removed. Joins using the optional separator, defaulting to the PHP DIRECTORY_SEPARATOR constant.
The final argument, $cb, is a callback that either evaluates to true or false and performs a filter operation, or it can also modify the directory/file names returned. To achieve the latter effect use as follows:
Returns the temp directory according to either the TMP, TMPDIR, or TEMP env variables. If these are not set it will also check for the existence of /tmp, %WINDIR%\temp