Close the file handle.
@return void
768023
public function close(): void
    {
        if ($this->closeAfter) {
            $this->closeAfter = false;
            \fclose($this->fp);
            \clearstatcache();
        }
    }
486789
public function close() : bool
    {
        foreach ($this->handlers as $handler) {
            if (method_exists($handler, 'close')) {
                $handler->close();
            }
        }
        return true;
    }
817687
protected function close()
    {
        if ($this->current_lot !== null) {
            $this->registry_count++;
            $this->current_lot += 2;
            $this->registries[] = $this->generateLotTrailer();
            $this->current_lot = null;
        }

        $this->registry_count++;
        $this->registries[] = $this->generateFileTrailer();
    }
404257
def close(self, filehandle):
        """"""
        with self.lock:
            if filehandle in self.files:
                self.files[filehandle] -= 1
                # trim the file cache
                index = 0
                size = len(self.past)
                while size > self.size and index < size:
                    filehandle = self.past[index]
                    if self.files[filehandle] == 0:
                        filehandle.close()
                        del self.files[filehandle]
                        del self.past[index]
                        size -= 1
                    else:
                        index += 1
89549
protected function close()
    {
        if ($this->input !== false) {
            fclose($this->input);
        }
        if ($this->output !== false) {
            fclose($this->output);
        }
    }
1001160
private function closeProcess()
    {
        fclose($this->pipes[0]);
        fclose($this->pipes[1]);
        fclose($this->pipes[2]);
        proc_close($this->process);
    }
597272
function close()
    {
        if ( $this->ClusteringEnabled )
        {
            $this->ClusterHandler = null;
            return;
        }

        if ( $this->FileResource )
        {
            fclose( $this->FileResource );

            if ( $this->isAtomic )
            {
                eZFile::rename( $this->tmpFilename, $this->requestedFilename, false, eZFile::CLEAN_ON_FAILURE );
            }
            $this->FileResource = false;
        }
    }
948480
public function close()
    {
        if ($this->stream === null) {
            return;
        }
        $this->flush();
        if (false === @fclose($this->stream)) {
            $metaData = stream_get_meta_data($this->stream);
            $resource = $metaData["uri"];
            $msg = "Cannot close " . $resource . ": $php_errormsg";
            throw new IOException($msg);
        }
        $this->stream = null;
    }
29354
public function close()
    {
        if (!$this->handle) return false;
        $status = $this->fs->fclose($this->handle);
        $this->handle = false;
        return $status;
    }
172734
protected function closeProcess()
    {
        if (! is_resource($this->process)) {
            return;
        }

        $procCloseFn = 'proc_close';
        if (!$this->resourceOpen instanceof ProcOpen) {
            $procCloseFn = 'fclose';
        }

        call_user_func($procCloseFn, $this->process);
    }
1097683
public function close()
	{
		if (!$this->fh)
		{
			throw new \RuntimeException('File not open');
		}

		// Capture PHP errors
		$php_errormsg = 'Error Unknown';
		$track_errors = ini_get('track_errors');
		ini_set('track_errors', true);

		switch ($this->processingmethod)
		{
			case 'gz':
				$res = gzclose($this->fh);
				break;

			case 'bz':
				$res = bzclose($this->fh);
				break;

			case 'f':
			default:
				$res = fclose($this->fh);
				break;
		}

		if (!$res)
		{
			throw new \RuntimeException($php_errormsg);
		}
		else
		{
			// Reset this
			$this->fh = null;
		}

		// If we wrote, chmod the file after it's closed
		if ($this->openmode[0] == 'w')
		{
			$this->chmod();
		}

		// Restore error tracking to what it was before
		ini_set('track_errors', $track_errors);

		// Return the result
		return true;
	}
203480
public function close()
    {
        $writer = IOFactory::createWriter($this->phpExcelObject, 'Xlsx');
        //\PHPExcel_IOFactory::createWriter($this->phpExcelObject, 'Excel2007');
        $writer->save($this->filename);
    }
1040543
private function closeAndAttemptToCleanupAllFiles()
    {
        // close the writer, which should remove all temp files
        $this->close();

        // remove output file if it was created
        if ($this->globalFunctionsHelper->file_exists($this->outputFilePath)) {
            $outputFolderPath = dirname($this->outputFilePath);
            $fileSystemHelper = new FileSystemHelper($outputFolderPath);
            $fileSystemHelper->deleteFile($this->outputFilePath);
        }
    }
26742
public function close()
    {
        $this->ending = true;

        foreach ($this->pending as $deferred) {
            $deferred->reject(new RuntimeException('Shell is ending'));
        }
        $this->pending = array();
        $this->buffer = '';

        $this->stream->removeListener('data', array($this, 'handleData'));
        $this->stream->removeListener('end', array($this, 'handleEnd'));

        $this->stream->close();
    }
1185816
function close()
    {
        /* If the log file is open, close it. */
        if ($this->_opened && fclose($this->_fp)) {
            $this->_opened = false;
        }

        return ($this->_opened === false);
    }
1290504
public function close()
    {
        $contents = ob_get_clean();
        header("Connection: close\r\n");
        header("Content-Encoding: none\r\n");
        ignore_user_abort(true);
        ob_start();
        echo $contents;
        $size = ob_get_length();
        header("Content-Length: $size");
        if(function_exists('fastcgi_finish_request'))
            fastcgi_finish_request();
        ob_end_flush();
        flush();
        ob_end_clean();
    }
96884
def close(self):
        
        if self._file:
            if not(self._file.closed):
                self._file.close()
        self.closed = True