/** * Open a readable stream top a remote file * * @param string $source * @return resource a read only stream with the contents of the remote file * * @throws \Icewind\SMB\Exception\NotFoundException * @throws \Icewind\SMB\Exception\InvalidTypeException */ public function read($source) { $this->connect(); $url = $this->buildUrl($source); $handle = $this->state->open($url, 'r'); return NativeStream::wrap($this->state, $handle, 'r', $url); }