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;


  }
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;


  }
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 ; }
Read an entry from the directory.

This gets a single line from the directory.
@code
<?php

// Assuming a valid context in $cxt...

// Get the container as if it were a directory.
$dir = opendir('swift://mycontainer', $cxt);

while (($entry = readdir($dir)) !== FALSE) {
print $entry . PHP_EOL;
}

closedir($dir);
?>
@endcode

@retval string
@return string
The name of the resource or FALSE when the directory has no more
entries.
Read an entry from the directory .