original_string: private function ensureIndexes()
      {
          if ($this->checkedIndexes) {
              return;
          }
  
          $this->checkedIndexes = true;
  
          if ( ! $this->isFilesCollectionEmpty()) {
              return;
          }
  
          $this->ensureFilesIndex();
          $this->ensureChunksIndex();
      }
code: private function ensureIndexes()
      {
          if ($this->checkedIndexes) {
              return;
          }
  
          $this->checkedIndexes = true;
  
          if ( ! $this->isFilesCollectionEmpty()) {
              return;
          }
  
          $this->ensureFilesIndex();
          $this->ensureChunksIndex();
      }
code_tokens: private function ensureIndexes ( ) { if ( $ this -> checkedIndexes ) { return ; } $ this -> checkedIndexes = true ; if ( ! $ this -> isFilesCollectionEmpty ( ) ) { return ; } $ this -> ensureFilesIndex ( ) ; $ this -> ensureChunksIndex ( ) ; }
docstring: Ensure indexes on the files and chunks collections exist.
  
  This method is called once before the first write operation on a GridFS
  bucket. Indexes are only be created if the files collection is empty.
docstring_tokens: Ensure indexes on the files and chunks collections exist .