public static function copyFile(string $source, string $dest)
    {
        $dir = dirname($dest);
        if (!is_dir($dir)) {
            mkdir($dir, 0700, true);
        }
        copy($source, $dest);
    }
public static function copyFile(string $source, string $dest)
    {
        $dir = dirname($dest);
        if (!is_dir($dir)) {
            mkdir($dir, 0700, true);
        }
        copy($source, $dest);
    }
public static function copyFile ( string $ source , string $ dest ) { $ dir = dirname ( $ dest ) ; if ( ! is_dir ( $ dir ) ) { mkdir ( $ dir , 0700 , true ) ; } copy ( $ source , $ dest ) ; }
mkdir and copy file
@param  string $source path to source file
@param  string $dest   path to destination
mkdir and copy file