Closes the file-like object.

    If the file-like object was passed in the init function the file
    object-based file-like object does not control the file-like object
    and should not actually close it.
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
475064
@Override
  public void close()
    throws IOException
  {
    long fd;

    synchronized (this) {
      fd = _fd;
      _fd = 0;
    }
    
    if (fd != 0) {
      closeNative(fd);
    }
  }
1017970
public function close()
    {
        if (!$this->isWriterOpened) {
            return;
        }

        $this->closeWriter();

        if (is_resource($this->filePointer)) {
            $this->globalFunctionsHelper->fclose($this->filePointer);
        }

        $this->isWriterOpened = false;
    }
1041292
@Override
  public synchronized void close() throws Exception {
    if (this.fileSystem != null && !this.fsClosed) {
      this.fileSystem.close();
      this.fsClosed = true;
    }
  }
1298608
def on_close(self):
        

        LOGGER.debug("> Calling '{0}' Component Framework 'on_close' method.".format(self.__class__.__name__))

        map(self.unregister_file, self.list_files())

        if self.store_session() and self.close_all_files(leave_first_editor=False):
            return True
1185141
@Override
    public void close () throws IOException {
        try {
            SmbFileHandleImpl h = this.handle;
            if ( h != null ) {
                h.close();
            }
        }
        catch ( SmbException se ) {
            throw seToIoe(se);
        }
        finally {
            this.tmp = null;
            this.handle = null;
            if ( this.unsharedFile ) {
                this.file.close();
            }
        }
    }
1083346
private void closeFileObject(ModuleSymbol mod, String typeName, FileObject fileObject) {
        /*
         * If typeName is non-null, the file object was opened as a
         * source or class file by the user.  If a file was opened as
         * a resource, typeName will be null and the file is *not*
         * subject to annotation processing.
         */
        if ((typeName != null)) {
            if (!(fileObject instanceof JavaFileObject))
                throw new AssertionError("JavaFileOject not found for " + fileObject);
            JavaFileObject javaFileObject = (JavaFileObject)fileObject;
            switch(javaFileObject.getKind()) {
            case SOURCE:
                generatedSourceNames.add(typeName);
                generatedSourceFileObjects.add(javaFileObject);
                openTypeNames.remove(typeName);
                break;

            case CLASS:
                generatedClasses.computeIfAbsent(mod, m -> Collections.synchronizedMap(new LinkedHashMap<>())).put(typeName, javaFileObject);
                openTypeNames.remove(typeName);
                break;

            default:
                break;
            }
        }
    }
1020492
def _Close(self):
    
    if not self._file_object_set_in_init:
      self._file_object.close()
      self._file_object = None

    self._compressed_data = b''
    self._uncompressed_data = b''
    self._decompressor = None
336746
def close(self):
        

        data = self.data
        self.data = None

        if hasattr(data, "close"):
            data.close()
402110
@Override
  public void closeImpl() throws IOException
  {
    unlock();

    _fileChannel = null;

    RandomAccessFile file = _file;
    _file = null;

    if (file != null)
      file.close();
  }
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])
554263
public void close() throws IOException {
        clear();
        if (_tempfile != null) {
            _tempfile.close();
            _tempfile = null;
            _tempfilef.delete();
            _tempfilef = null;
        }
    }
472109
@Override
  public void close() throws IOException {
    if (mIn != null) {
      mIn.close();
    }

    if (mOut != null) {
      mOut.close();
    }
    mOffset = -1;
  }
1247256
void destroy() {
        fileAccess.getAndUpdate(channel -> {
            if (channel != null) {
                try {
                    channel.close();
                } catch (IOException e) {
                    LOG.warn("Error closing file channel for disk file upload", e);
                }
            }
            return null;
        });
        data.release();
    }
441722
public function close() {
        // Close the file handle if hasn't been closed already.
        if (is_resource($this->fhandle)) {
            fclose($this->fhandle);
            $this->fhandle = null;
        }
    }
1121973
public void close() throws IOException {

        writeStream.close();

        if (!writeFile.delete()) {
            throw new IOException(
                RB.singleton.getString(
                    RB.WORKFILE_DELETE_FAIL, writeFile.getAbsolutePath()));
        }
    }
1323576
def _close(self):
        '''
        
        '''
        if hasattr(self, 'aiohttp'):
            if not self.aiohttp.closed:
                self.aiohttp.close()
        if hasattr(self, 'file_descriptors'):
            for fd in self.file_descriptors.values():
                if not fd.closed:
                    fd.close()