copy

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Copies file
<?php copy(string $from, string $to, ?resource $context = null): bool
<?php     public function copy($path, $target)

    {

        return copy($path, $target);

    }
<?php         } else {

            $this->components->info('Published API routes file.');



            copy(__DIR__.'/stubs/api-routes.stub', $apiRoutesPath);



            if ($this->option('passport')) {

                (new Filesystem)->replaceInFile(
<?php         if (! file_exists($broadcastingRoutesPath = $this->laravel->basePath('routes/channels.php')) || $this->option('force')) {

            $this->components->info("Published 'channels' route file.");



            copy(__DIR__.'/stubs/broadcasting-routes.stub', $broadcastingRoutesPath);

        }



        $this->uncommentChannelsRoutesFile();
<?php                 mkdir($directory, 0755, true);

            }



            copy(__DIR__.'/stubs/echo-js.stub', $echoScriptPath);

        }



        if (file_exists($bootstrapScriptPath = $this->laravel->resourcePath('js/bootstrap.js'))) {
<?php             return;

        }



        copy($file, $destination);



        $this->components->info("Published '{$name}' configuration file.");

    }
<?php                 mkdir(dirname($toPath));

            }



            copy($fromPath, $toPath);



            View::render('components.two-column-detail', [

                'left' => $to,
<?php         if ($this->confirm('Unable to locate RoadRunner binary. Should Octane download the binary for your operating system?', true)) {

            $this->downloadRoadRunnerBinary();



            copy(__DIR__.'/../stubs/rr.yaml', base_path('.rr.yaml'));

        }



        return base_path('rr');
<?php             $this->resolveDirectoryVisibility($config->get(Config::OPTION_DIRECTORY_VISIBILITY))

        );



        if ( ! @copy($sourcePath, $destinationPath)) {

            throw UnableToCopyFile::fromLocationTo($sourcePath, $destinationPath);

        }

    }
<?php             mkdir($backupDir, 0777, true);

        }



        copy($file, $backupPath);

    }
<?php     {

        $container = $this->container;

        $size = filesize($fixture = __DIR__.'/__fixtures__/container/a.txt');

        copy($fixture, Storage::disk('test')->getAdapter()->getPathPrefix().'test.txt');



        $asset = (new Asset)

            ->container($this->container)
<?php         parent::setUp();



        (new Process(['tar', '-xzvf', 'vendor.tar.gz'], $this->basePath()))->mustRun();

        copy($this->basePath('composer.json'), $this->basePath('composer.json.bak'));

        copy($this->basePath('composer.lock'), $this->basePath('composer.lock.bak'));

        Cache::forget('composer.test/package');
<?php         (new Process(['tar', '-xzvf', 'vendor.tar.gz'], $this->basePath()))->mustRun();

        copy($this->basePath('composer.json'), $this->basePath('composer.json.bak'));

        copy($this->basePath('composer.lock'), $this->basePath('composer.lock.bak'));

        Cache::forget('composer.test/package');



        Composer::swap(new \Statamic\Console\Processes\Composer($this->basePath()));
<?php                 $this->io->writeError('Writing '.$this->root . $file.' into cache from '.$source);

            }



            return copy($source, $this->root . $file);

        }



        return false;
<?php                 $this->io->writeError('Reading '.$this->root . $file.' from cache', true, IOInterface::DEBUG);



                return copy($this->root . $file, $target);

            }

        }
<?php         if ($backupTarget) {

            @copy($localFilename, $backupTarget);

        }



        try {