public function dir_readdir() {
    // If we are at the end of the listing, return FALSE.
    if (count($this->dirListing) <= $this->dirIndex) {
      return FALSE;
    }

    $curr = $this->dirListing[$this->dirIndex];
    $this->dirIndex++;

    if ($curr instanceof \HPCloud\Storage\ObjectStorage\Subdir) {
      $fullpath = $curr->path();
    }
    else {
       $fullpath = $curr->name();
    }

    if (!empty($this->dirPrefix)) {
      $len = strlen($this->dirPrefix);
      $fullpath = substr($fullpath, $len);
    }
    return $fullpath;


  }