Pagekit\Filesystem\Filesystem::copy PHP Method

copy() public method

Copies a file.
public copy ( string $source, string $target ) : boolean
$source string
$target string
return boolean
    public function copy($source, $target)
    {
        $source = $this->getPathInfo($source, 'pathname');
        $target = $this->getPathInfo($target);
        if (!is_file($source) || !$this->makeDir($target['dirname'])) {
            return false;
        }
        return @copy($source, $target['pathname']);
    }