Close the atomic file, but do not "commit" the temporary file
on top of the destination. This should be used if there is a failure
in writing.
518738
public void abort() {
    try {
      super.close();
    } catch (IOException ioe) {
      LOG.warn("Unable to abort file " + tmpFile, ioe);
    }
    if (!tmpFile.delete()) {
      LOG.warn("Unable to delete tmp file during abort " + tmpFile);
    }
  }
1287454
def close(self):
        

        if self.tmpdir:
            rmtree(self.tmpdir)
            self.tmpdir = None

        self._contents = None
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)
1095199
def close(self):
        """"""
        if self._cache:
            if self._update_cache:
                self._write_cache_to_file()
            self._cache = None
1231406
def close(self):
        """"""
        if not self.active:
            return

        self.active = False
        if self._file:
            self._file.close()
            self._sincedb_update_position(force_update=True)

        if self._current_event:
            event = '\n'.join(self._current_event)
            self._current_event.clear()
            self._callback_wrapper([event])
343384
@Override
	public void close()
    {
    	// Close filesystem
        try
        {
            if (allocationTableRandomAccessFile != null)
                allocationTableRandomAccessFile.close();
        }
        catch (IOException e)
        {
            log.error("["+descriptor.getName()+"] Could not close allocation table file : "+e.toString());
        }
        try
        {
            if (dataRandomAccessFile != null)
                dataRandomAccessFile.close();
        }
        catch (IOException e)
        {
            log.error("["+descriptor.getName()+"] Could not close map file : "+e.toString());
        }
    }
177870
def close
      begin
        @f.flush
        @f.flock(File::LOCK_UN)
        @f.close
      rescue IOError => e
        PEROBS.log.fatal "Cannot close stack file #{@file_name}: #{e.message}"
      end
    end
374053
@Override
  public void close() throws IOException {
    try {
      workbook.close();
    } finally {
      if(tmp != null) {
        if (log.isDebugEnabled()) {
          log.debug("Deleting tmp file [" + tmp.getAbsolutePath() + "]");
        }
        tmp.delete();
      }
    }
  }
911627
def close(self):
        
        if callable(getattr(self._file, 'close', None)):
            self._iterator.close()
        self._iterator = None
        self._unconsumed = None
        self.closed = True
1078922
def close(self):
        
        self.sync()
        self.sync = self.create = self.delete = self._closed
        self._write_to_file = self._read_to_file = self._closed
        self._key_to_filename = self._filename_to_key = self._closed
        self.__getitem__ = self.__setitem__ = self.__delitem__ = self._closed
        self.__iter__ = self.__len__ = self.__contains__ = self._closed
864247
@Override
	public void close() throws IOException {

		// enforce sequential close() calls
		synchronized (CLOSE_MUTEX) {
			this.recordWriter.close(new HadoopDummyReporter());

			if (this.outputCommitter.needsTaskCommit(this.context)) {
				this.outputCommitter.commitTask(this.context);
			}
		}
	}
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
203960
def close(self):
        
        files = self.__dict__.get("files")
        for _key, value in iter_multi_items(files or ()):
            value.close()
907947
def close(self):
        """"""

        self._close_proc()
        super(PipeReader, self).close()

        if self._tempfile:
            try:
                os.unlink(self._tempfile)
            except OSError:
                pass
            self._tempfile = None
1010642
def close(self):
        """"""
        if self._filename and self._fh:
            self._fh.close()
            self._fh = None
96884
def close(self):
        
        if self._file:
            if not(self._file.closed):
                self._file.close()
        self.closed = True
1360464
def close(self):
        
        from .collection import Collection
        from .data._data import Channel, Data, Variable

        path = os.path.abspath(self.filepath) + "::"
        for key in list(Group._instances.keys()):
            if key.startswith(path):
                Group._instances.pop(key, None)

        if self.fid.valid > 0:
            # for some reason, the following file operations sometimes fail
            # this stops execution of the method, meaning that the tempfile is never removed
            # the following try case ensures that the tempfile code is always executed
            # ---Blaise 2018-01-08
            try:
                self.file.flush()
                try:
                    # Obtaining the file descriptor must be done prior to closing
                    fd = self.fid.get_vfd_handle()
                except (NotImplementedError, ValueError):
                    # only available with certain h5py drivers
                    # not needed if not available
                    pass

                self.file.close()
                try:
                    if fd:
                        os.close(fd)
                except OSError:
                    # File already closed, e.g.
                    pass
            except SystemError as e:
                warnings.warn("SystemError: {0}".format(e))
            finally:
                if hasattr(self, "_tmpfile"):
                    os.close(self._tmpfile[0])
                    os.remove(self._tmpfile[1])