/** * Get the URL using a `hasDir()` method on the adapter. * * @param string $path * @return string */ protected function getFromMethod($path) { $res = false; if ($this->cachedAdapter) { $res = $this->cachedAdapter->getMetadata($path); } if (!$res || !isset($res['hasdir'])) { $res = $this->adapter->hasDir($path); } if (is_array($res)) { return isset($res['hasdir']) ? $res['hasdir'] : true; } else { return $res; } }