Closes the underlying zip file, ensuring all records are written,
        then re-opens the file for further modifications.
960516
def flush(self):
        """"""
        if self.mode != 'r':
            with self.mutex:
                self.zf.close()
                # N.B., re-open with mode 'a' regardless of initial mode so we don't wipe
                # what's been written
                self.zf = zipfile.ZipFile(self.path, mode='a',
                                          compression=self.compression,
                                          allowZip64=self.allowZip64)
515164
@Override
  public void close() throws IOException {
    final MapAppender appender = mapAppender;
    if (appender != null) {
      appender.close();
    }
    mapAppender = null;

    recordCache = null;
  }
917543
public void closeFile() {

        if (getZipFile() != null) {
            try {
                getZipFile().close();
            } catch (IOException e) {
                CmsMessageContainer message = Messages.get().container(
                    Messages.ERR_IMPORTEXPORT_ERROR_CLOSING_ZIP_ARCHIVE_1,
                    getZipFile().getName());
                if (LOG.isDebugEnabled()) {
                    LOG.debug(message.key(), e);
                }
            }
        }
    }
1011878
def close(self):
        """"""
        if not self.closed:
            # be sure to flush data to disk before closing the file
            self.flush()
            err = _snd.sf_close(self._file)
            self._file = None
            _error_check(err)
445252
public void close() throws IOException {
    LOG.info(getTask()+" done; removing files.");
    getTask().getProgress().setStatus("closed");
    mapOutputFile.removeAll(getTask().getTaskID());
  }
558397
def close_file(self):
        

        if not self.is_modified():
            LOGGER.debug("> Closing '{0}' file.".format(self.__file))

            self.file_closed.emit()
            return True

        choice = message_box.message_box("Warning", "Warning",
                                         "'{0}' document has been modified!\nWould you like to save your changes?".format(
                                             self.get_file_short_name()),
                                         buttons=QMessageBox.Save | QMessageBox.Discard | QMessageBox.Cancel)
        if choice == QMessageBox.Save:
            if self.save_file():
                LOGGER.debug("> Closing '{0}' file.".format(self.__file))
                return True
        elif choice == QMessageBox.Discard:
            LOGGER.debug("> Discarding '{0}' file.".format(self.__file))

            self.file_closed.emit()
            return True
        else:
            return False
65032
public function close(): bool {

        try {
            foreach ( $this->zip_archives as $archive ) {
                $archive->close();
            }
            return true;
        } catch (ZipException $ze) {
            throw $ze;
        }

    }
766351
public void close() throws IOException {
    if (kids != null) {
      for (RecordReader<K,? extends Writable> rr : kids) {
        rr.close();
      }
    }
    if (jc != null) {
      jc.close();
    }
  }
1232863
public void close() {

        try {
            rwLock.writeLock().lock();
            closeNoRWLock();
        } finally {
            rwLock.writeLock().unlock();
        }

        if (this.deleteDiskFiles) {
            deleteDiskCacheFiles();
            this.deleteDiskFiles = false;
        }
    }
731528
def close(self):
    
    if not self._is_open:
      raise IOError('Not opened.')

    if not self._is_cached:
      close_file_object = True
    elif self._resolver_context.ReleaseFileObject(self):
      self._is_cached = False
      close_file_object = True
    else:
      close_file_object = False

    if close_file_object:
      self._Close()
      self._is_open = False
554263
public void close() throws IOException {
        clear();
        if (_tempfile != null) {
            _tempfile.close();
            _tempfile = null;
            _tempfilef.delete();
            _tempfilef = null;
        }
    }
427297
def _Close(self):
    
    if not self._file_object_set_in_init:
      try:
        # TODO: fix close being called for the same object multiple times.
        self._file_object.close()
      except IOError:
        pass
      self._file_object = None
220623
def clean_zipfile(self):
        ''''''
        if os.path.isfile(self.zip_file):
            os.remove(self.zip_file)
1095199
def close(self):
        """"""
        if self._cache:
            if self._update_cache:
                self._write_cache_to_file()
            self._cache = None
433857
@Override
  public void close() throws IOException {

    if (Files.exists(outFile)) {
      Files.delete(outFile);
    }

    if (Files.exists(errFile)) {
      Files.delete(errFile);
    }

    if (Files.exists(resultFile)) {
      Files.delete(resultFile);
    }
  }
524667
public void closeFiles() {
        filesAreOpened = false;
        for (HeaderIndexFile<Data> file : files) {
            if (file != null) {
                file.close();
            }
        }
    }
345488
def _Close(self):
    
    if not self._file_object_set_in_init:
      self._file_object.close()
      self._file_object = None

    self._decrypter = None
    self._decrypted_data = b''
    self._encrypted_data = b''