public function copy(string $destination, $overwrite = false) : bool
    {
        $copied = false;

        if ($this->isFile()) {
            $exists = file_exists($destination);
            if (!$exists || ($exists && $overwrite)) {
                $copied = copy($this->realPath, $destination);
            }
        }

        return $copied;
    }
public function copy(string $destination, $overwrite = false) : bool
    {
        $copied = false;

        if ($this->isFile()) {
            $exists = file_exists($destination);
            if (!$exists || ($exists && $overwrite)) {
                $copied = copy($this->realPath, $destination);
            }
        }

        return $copied;
    }
public function copy ( string $ destination , $ overwrite = false ) : bool { $ copied = false ; if ( $ this -> isFile ( ) ) { $ exists = file_exists ( $ destination ) ; if ( ! $ exists || ( $ exists && $ overwrite ) ) { $ copied = copy ( $ this -> realPath , $ destination ) ; } } return $ copied ; }
Copy the current source to destination.

@param string $destination
@param bool   $overwrite

@return bool
Copy the current source to destination .