/** * 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 write($source) { $this->connect(); $url = $this->buildUrl($source); $handle = $this->state->create($url); return NativeStream::wrap($this->state, $handle, 'w', $url); }