Habari\Media::copy PHP Method

copy() public static method

Copy the asset using the specified from and to paths
public static copy ( string $pathfrom, string $pathto ) : boolean
$pathfrom string The virtual path source
$pathto string The virtual path destination
return boolean true on success
    public static function copy($pathfrom, $pathto)
    {
        if ($source = Media::get($pathfrom)) {
            return Media::put($pathto, $source);
        } else {
            return false;
        }
    }