code: def _start_new_cdx_file(self):
          '''Create and set current CDX file.'''
          self._cdx_filename = '{0}.cdx'.format(self._prefix_filename)
  
          if not self._params.appending:
              wpull.util.truncate_file(self._cdx_filename)
              self._write_cdx_header()
          elif not os.path.exists(self._cdx_filename):
              self._write_cdx_header(f _start_new_cdx_file(self):
          '''Create and set current CDX file.'''
          self._cdx_filename = '{0}.cdx'.format(self._prefix_filename)
  
          if not self._params.appending:
              wpull.util.truncate_file(self._cdx_filename)
              self._write_cdx_header()
          elif not os.path.exists(self._cdx_filename):
              self._write_cdx_header()
docs: Create and set current CDX file.