function stream_flush() { if ($this->mode != 'r' && $this->need_flush) { smb::clearstatcache($this->url); smb::execute('put "' . $this->tmpfile . '" "' . $this->parsed_url['path'] . '"', $this->parsed_url); $this->need_flush = FALSE; } }
private function getStream() { if (isset($this->stream)) { return $this->stream; } if (isset($this->defer_stream_read)) { $this->tmpfile = tempnam(SMB4PHP_SMBTMP, 'smb.down'); self::debug("Creating real tmp file now"); smb::execute('get "' . $this->parsed_url['path'] . '" "' . $this->tmpfile . '"', $this->parsed_url); $this->stream = fopen($this->tmpfile, $this->mode); } return $this->stream; }