parameters: (self)
docstring: Close the TarFile. In write-mode, two finishing zero blocks are
             appended to the archive.
docstring_summary: Close the TarFile. In write-mode, two finishing zero blocks are
             appended to the archive.
docstring_tokens: Close the TarFile . In write - mode two finishing zero blocks are appended to the archive .
function: def close(self):
          """Close the TarFile. In write-mode, two finishing zero blocks are
             appended to the archive.
          """
          if self.closed:
              return
  
          if self.mode in "aw":
              self.fileobj.write(NUL * (BLOCKSIZE * 2))
              self.offset += (BLOCKSIZE * 2)
              # fill up the end with zero-blocks
              # (like option -b20 for tar does)
              blocks, remainder = divmod(self.offset, RECORDSIZE)
              if remainder > 0:
                  self.fileobj.write(NUL * (RECORDSIZE - remainder))
  
          if not self._extfileobj:
              self.fileobj.close()
          self.closed = True
function_tokens: def close ( self ) : if self . closed : return if self . mode in "aw" : self . fileobj . write ( NUL * ( BLOCKSIZE * 2 ) ) self . offset += ( BLOCKSIZE * 2 ) # fill up the end with zero-blocks # (like option -b20 for tar does) blocks , remainder = divmod ( self . offset , RECORDSIZE ) if remainder > 0 : self . fileobj . write ( NUL * ( RECORDSIZE - remainder ) ) if not self . _extfileobj : self . fileobj . close ( ) self . closed = True