public static function file($path, $type = null)
    {
        $response = new self(
            Status::OK,
            new PhpStream($path, 'rb')
        );
        if (isset($type)) {
            $response->setHeader('Content-Type', $type);
        }
        return $response;
    }
public static function file($path, $type = null)
    {
        $response = new self(
            Status::OK,
            new PhpStream($path, 'rb')
        );
        if (isset($type)) {
            $response->setHeader('Content-Type', $type);
        }
        return $response;
    }
public static function file ( $ path , $ type = null ) { $ response = new self ( Status :: OK , new PhpStream ( $ path , 'rb' ) ) ; if ( isset ( $ type ) ) { $ response -> setHeader ( 'Content-Type' , $ type ) ; } return $ response ; }
Create a file response.

@param string $path Path to file.
@param string|null $type Optional MIME type.
@return self The response.
Create a file response .