public static function getTempFilename(string $path = '', string $prefix = '', string $extension = ''): string
    {
        if ($path === '') {
            $path = sys_get_temp_dir();
        }
        if ($extension !== '' && substr($extension, 0, 1) !== '.') {
            $extension = '.' . $extension;
        }
        $filename = Str::unique($prefix, $extension);
        if (is_dir($path)) {
            touch($path . '/' . $filename);
        }
        return $path . '/' . $filename;
    }
public static function getTempFilename(string $path = '', string $prefix = '', string $extension = ''): string
    {
        if ($path === '') {
            $path = sys_get_temp_dir();
        }
        if ($extension !== '' && substr($extension, 0, 1) !== '.') {
            $extension = '.' . $extension;
        }
        $filename = Str::unique($prefix, $extension);
        if (is_dir($path)) {
            touch($path . '/' . $filename);
        }
        return $path . '/' . $filename;
    }
public static function getTempFilename ( string $ path = '' , string $ prefix = '' , string $ extension = '' ) : string { if ( $ path === '' ) { $ path = sys_get_temp_dir ( ) ; } if ( $ extension !== '' && substr ( $ extension , 0 , 1 ) !== '.' ) { $ extension = '.' . $ extension ; } $ filename = Str :: unique ( $ prefix , $ extension ) ; if ( is_dir ( $ path ) ) { touch ( $ path . '/' . $ filename ) ; } return $ path . '/' . $ filename ; }
Get temp filename.

@param string $path Default '' which means sys_get_temp_dir().
@param string $prefix Default ''.
@param string $extension Default ''.
@return string
Get temp filename .