src/FileUpload/InputFile.php
public function open()
    {
        if (is_resource($this->path)) {
            return $this->path;
        }

        if (!$this->isRemoteFile() && !is_readable($this->path)) {
            throw new TelegramSDKException('Failed to create InputFile entity. Unable to read resource: '.$this->path.'.');
        }

        return Psr7\try_fopen($this->path, 'r');
    }
public function open()
    {
        if (is_resource($this->path)) {
            return $this->path;
        }

        if (!$this->isRemoteFile() && !is_readable($this->path)) {
            throw new TelegramSDKException('Failed to create InputFile entity. Unable to read resource: '.$this->path.'.');
        }

        return Psr7\try_fopen($this->path, 'r');
    }
public function open ( ) { if ( is_resource ( $ this -> path ) ) { return $ this -> path ; } if ( ! $ this -> isRemoteFile ( ) && ! is_readable ( $ this -> path ) ) { throw new TelegramSDKException ( 'Failed to create InputFile entity. Unable to read resource: ' . $ this -> path . '.' ) ; } return Psr7 \ try_fopen ( $ this -> path , 'r' ) ; }
Opens file stream.

@throws TelegramSDKException

@return resource
Opens file stream .