/** * @param SambaUrl $url * @return bool */ public function isFromSameUserShare(SambaUrl $url) { if ($this->getDomain() == $url->getDomain() && $this->getHost() == $url->getHost() && $this->getShare() == $url->getShare() && $this->getUser() == $url->getUser() && $this->getPass() == $url->getPass()) { return true; } else { return false; } }
/** * @param SambaUrl $url * @return array * @throws SambaException */ protected function shareInfo(SambaUrl $url) { $lowerShare = strtolower($url->getShare()); # fix by Eric Leung if ($lookInfo = $this->look($url)) { foreach ($lookInfo['disk'] as $share) { if ($lowerShare == strtolower($share)) { return array('attr' => 'D', 'size' => 0, 'time' => 0); } } } throw new SambaException("url_stat(): disk resource '{$lowerShare}' not found in '{$url->getHost()}'"); }