public function dir_readdir() {
    // Current file list will be null if there was a rewind.
    if (is_null($this->current_file_list)) {
      if (!$this->fillFileBuffer()) {
        return false;
      }
    } else if (empty($this->current_file_list)) {
      // If there is no next marker, or we cannot fill the buffer, we are done.
      if (!isset($this->next_marker) || !$this->fillFileBuffer()) {
        return false;
      }
    }

    // The file list might be empty if out next_marker was actually the last
    // file in the list.
    if (empty($this->current_file_list)) {
      return false;
    } else {
      return array_shift($this->current_file_list);
    }
  }
public function dir_readdir() {
    // Current file list will be null if there was a rewind.
    if (is_null($this->current_file_list)) {
      if (!$this->fillFileBuffer()) {
        return false;
      }
    } else if (empty($this->current_file_list)) {
      // If there is no next marker, or we cannot fill the buffer, we are done.
      if (!isset($this->next_marker) || !$this->fillFileBuffer()) {
        return false;
      }
    }

    // The file list might be empty if out next_marker was actually the last
    // file in the list.
    if (empty($this->current_file_list)) {
      return false;
    } else {
      return array_shift($this->current_file_list);
    }
  }
public function dir_readdir ( ) { // Current file list will be null if there was a rewind. if ( is_null ( $ this -> current_file_list ) ) { if ( ! $ this -> fillFileBuffer ( ) ) { return false ; } } else if ( empty ( $ this -> current_file_list ) ) { // If there is no next marker, or we cannot fill the buffer, we are done. if ( ! isset ( $ this -> next_marker ) || ! $ this -> fillFileBuffer ( ) ) { return false ; } } // The file list might be empty if out next_marker was actually the last // file in the list. if ( empty ( $ this -> current_file_list ) ) { return false ; } else { return array_shift ( $ this -> current_file_list ) ; } }
Read the next file in the directory list. If the list is empty and we
believe that there are more results to read then fetch them

@return string The name of the next file in the directory, false if there
are not more files.
Read the next file in the directory list . If the list is empty and we believe that there are more results to read then fetch them