public static function from($file, $prefix = 'php-tmp-file')
    {
        $tmpFile = static::generate($prefix);

        copy($file, $tmpFile);

        return $tmpFile;
    }
public static function from($file, $prefix = 'php-tmp-file')
    {
        $tmpFile = static::generate($prefix);

        copy($file, $tmpFile);

        return $tmpFile;
    }
public static function from ( $ file , $ prefix = 'php-tmp-file' ) { $ tmpFile = static :: generate ( $ prefix ) ; copy ( $ file , $ tmpFile ) ; return $ tmpFile ; }
Creates a temp file from an exist file keeping it safe.

@param mixed $file
@param string $prefix

@return TempFile
Creates a temp file from an exist file keeping it safe .