/** * Return an array of the items contained in the given path. The items * returned are the files or objects that in the specified path. * * @param string $path * @param array $options * @return array */ public function listItems($path, $options = null) { if (!empty($path)) { $options = array('prefix' => $path); } $files = $this->rackspace->getObjects($this->container, $options); if (!$this->rackspace->isSuccessful()) { throw new Exception\RuntimeException('Error on list items: ' . $this->rackspace->getErrorMsg()); } $resultArray = array(); if (!empty($files)) { foreach ($files as $file) { $resultArray[] = $file->getName(); } } return $resultArray; }