code: public function close()
      {
          if (!$this->isOpened()) {
              return;
          }
  
          $this->unlock();
  
          if ($this->handle && !fclose($this->handle)) {
              throw new \RuntimeException("Could not close file " . $this->filePath);
          }
      }
docs: Closes the file
  
  @return void
  @throws \RuntimeException