application/Espo/Core/Utils/Util.php
public static function concatPath($folderPath, $filePath = null)
    {
        if (is_array($folderPath)) {
            $fullPath = '';
            foreach ($folderPath as $path) {
                $fullPath = static::concatPath($fullPath, $path);
            }
            return static::fixPath($fullPath);
        }

        if (empty($filePath)) {
            return static::fixPath($folderPath);
        }
        if (empty($folderPath)) {
            return static::fixPath($filePath);
        }

        if (substr($folderPath, -1) == static::getSeparator() || substr($folderPath, -1) == '/') {
            return static::fixPath($folderPath . $filePath);
        }
        return $folderPath . static::getSeparator() . $filePath;
    }
public static function concatPath($folderPath, $filePath = null)
    {
        if (is_array($folderPath)) {
            $fullPath = '';
            foreach ($folderPath as $path) {
                $fullPath = static::concatPath($fullPath, $path);
            }
            return static::fixPath($fullPath);
        }

        if (empty($filePath)) {
            return static::fixPath($folderPath);
        }
        if (empty($folderPath)) {
            return static::fixPath($filePath);
        }

        if (substr($folderPath, -1) == static::getSeparator() || substr($folderPath, -1) == '/') {
            return static::fixPath($folderPath . $filePath);
        }
        return $folderPath . static::getSeparator() . $filePath;
    }
public static function concatPath ( $ folderPath , $ filePath = null ) { if ( is_array ( $ folderPath ) ) { $ fullPath = '' ; foreach ( $ folderPath as $ path ) { $ fullPath = static :: concatPath ( $ fullPath , $ path ) ; } return static :: fixPath ( $ fullPath ) ; } if ( empty ( $ filePath ) ) { return static :: fixPath ( $ folderPath ) ; } if ( empty ( $ folderPath ) ) { return static :: fixPath ( $ filePath ) ; } if ( substr ( $ folderPath , - 1 ) == static :: getSeparator ( ) || substr ( $ folderPath , - 1 ) == '/' ) { return static :: fixPath ( $ folderPath . $ filePath ) ; } return $ folderPath . static :: getSeparator ( ) . $ filePath ; }
Get a full path of the file

@param string | array $folderPath - Folder path, Ex. myfolder
@param string $filePath - File path, Ex. file.json

@return string
Get a full path of the file