Elgg\Composer\PostInstall::copyFromElggToRoot PHP Метод

copyFromElggToRoot() приватный статический Метод

Copies a file from the given location in Elgg to the given location in root.
private static copyFromElggToRoot ( string $elggPath, string $rootPath, boolean $overwrite = false ) : boolean
$elggPath string Path relative to elgg dir.
$rootPath string Path relative to app root dir.
$overwrite boolean Overwrite file if it exists in root path, defaults to false.
Результат boolean Whether the copy succeeded.
    private static function copyFromElggToRoot($elggPath, $rootPath, $overwrite = false)
    {
        $from = Elgg\Application::elggDir()->getPath($elggPath);
        $to = Directory\Local::root()->getPath($rootPath);
        if (!$overwrite && file_exists($to)) {
            return false;
        }
        return copy($from, $to);
    }