Close the file

@return boolean Successfully closed the file
351767
public function close() {
		$result = fclose($this->file);
		if($result == true) {
			$this->open = false;
			return true;
		}
		return false;
	}
953520
public function close()
    {
        if (isset($this->pipe)) {
            \fclose($this->pipe);
        }

        if (isset($this->proc)) {
            $exit = \proc_close($this->proc);
            if ($exit !== 0) {
                throw new \RuntimeException('Error closing output stream');
            }
        }

        unset($this->pipe, $this->proc);
    }
1111896
public function close()
    {
        if (!$this->connection) {
            return false;
        }
        $this->countConnections--;
        if ($this->countConnections > 0) {
            return false;
        }
        $this->implementation->close($this->connection);
        $this->connection = null;
        return true;
    }
466282
function close()
    {
        /* If we haven't been opened, there's nothing more to do. */
        if (!$this->_opened) {
            return true;
        }

        /* Attempt to close each of our children. */
        $closed = true;
        foreach ($this->_children as $child) {
            if ($child->_opened) {
                $closed &= $child->close();
            }
        }

        /* Clear the opened state for consistency. */
        $this->_opened = false;

        /* If all children were closed, return success. */
        return $closed;
    }
189634
public function stream_close()
	{
		if ( !\is_resource($this->resource) )
		{
			return;
		}

		// Close the resource.
		if ( $this->resourceType === static::RESOURCE_TYPE_FILE )
		{
			\fclose( $this->resource );
		}
		else if ( $this->ssl )
		{
			\fclose( $this->resource );
			// Only save the file when not loaded locally.
			$saveFile = $this->getSaveFile();
			\file_put_contents( $saveFile, $this->content );
		}
		else if ( $this->resourceType === static::RESOURCE_TYPE_SOCKET )
		{
			// This could throw errors if the socket is not connected on some systems.
			@\socket_shutdown( $this->resource );
			\socket_close( $this->resource );
			// Only save the file when not loaded locally.
			$saveFile = $this->getSaveFile();
			\file_put_contents( $saveFile, $this->content );
		}

		// Leave the resource for garbage clean-up.
		$this->resource = NULL;

		// Reset so we do not overwrite a file unintentionally for the next request.
		static::clearSaveFile();
	}
862989
public function close(){
		switch($this->getMode()){
			case 'w':
			case 'wb':
			case 'a':
			case 'a+':
				$this->sync();
				$url = $this->getURI();
				return $this->call($url,array(
					 'action'	=>	self::FILE_IO_STORE
					,'path'		=>	$this->path
				));
				break;
			case 'r':
			case 'rb':
			default:
				return microtime(true);
				break;
		}
		return true;
	}
1053239
public function stream_close()
    {
        @fclose($this->temporaryFileHandle);
        
        // Upload the file?
        if ($this->writeMode) {
            // Make sure the container exists
            if (! $this->containerExists($this->fileName)) {
                $this->getStorageClient($this->fileName)->createContainer($this->getContainerName($this->fileName));
            }
            
            $mimeTypeGuesser = MimeTypeGuesser::getInstance();
            $createBlobOptions = new CreateBlobOptions();
            $createBlobOptions->setBlobContentType($mimeTypeGuesser->guess($this->temporaryFileName));
            
            // Upload the file
            try {
                $result = $this->getStorageClient($this->fileName)->createBlockBlob($this->getContainerName($this->fileName), $this->getFileName($this->fileName), fopen($this->temporaryFileName, "r"), $createBlobOptions);
            } catch (Exception $ex) {
                $this->cleanup();
                
                throw $ex;
            }
        }
        
        $this->cleanup();
    }
1009772
public function close()
    {
        if($resource = $this->getResource())
        {
            if(@fclose($resource) === true)
            {
                $this->_resource = null;
                return true;
            }
        }

        return false;
    }
96884
def close(self):
        
        if self._file:
            if not(self._file.closed):
                self._file.close()
        self.closed = True
1343760
public function close(): bool
    {
        $sessionId = session_id();

        $identifier = $this->cryptProvider->makeSessionIdentifier($sessionId);

        $this->storageDriver->unlock($identifier);

        return true;
    }
1056675
public function close():int
    {
        if ($this->file != null) {
            $rs = 1;
            if (is_resource($this->file)) {
                $rs = fclose($this->file);
            }
            $this->perm = $this->filepath = $this->file = null;
            return ($rs);
        }
        return (1);
    }
669263
public static function destruct()
    {
        if (is_null(self::$_file) || !is_resource(self::$_file)) {
            return false;
        }

        try {
            fclose(self::$_file);
        } catch (Exception $e) {
            return false;
        }
        return true;
    }
74037
function close()
    {
        $this->flush();
        $this->_opened = false;
        if ($this->_closeResource === true && is_resource($this->_stream)) {
            fclose($this->_stream);
        }
        return true;
    }
1181078
public function destroy()
	{
		$path = $this->path();

		if (file_exists($path))
		{
			if (!\Filesystem::delete($path))
			{
				$this->addError('Unable to delete file.');

				return false;
			}
		}

		return parent::destroy();
	}
444368
public function close()
    {
        if ($this->isClosed) {
            // TODO: Should this be an error condition? e.g. BadMethodCallException
            return;
        }

        if (strlen($this->buffer) > 0) {
            $this->insertChunkFromBuffer();
        }

        $this->fileCollectionInsert();
        $this->isClosed = true;
    }
511197
function close()
    {
        if ($this->_fileclosed) { // Prevent close() from being called twice.
            return true;
        }
        $res = $this->_storeWorkbook();
        if ($this->isError($res)) {
            return $this->raiseError($res->getMessage());
        }
        $this->_fileclosed = 1;
        return true;
    }
927856
public function close()
    {
        if (!is_resource($this->sheetFilePointer)) {
            return;
        }

        fwrite($this->sheetFilePointer, '</sheetData>');
        fwrite($this->sheetFilePointer, '</worksheet>');
        fclose($this->sheetFilePointer);
    }