core-bundle/src/Resources/contao/library/Contao/File.php
public function close()
	{
		if (\is_resource($this->resFile))
		{
			$this->Files->fclose($this->resFile);
		}

		// Create the file path
		if (!file_exists($this->strRootDir . '/' . $this->strFile))
		{
			// Handle open_basedir restrictions
			if (($strFolder = \dirname($this->strFile)) == '.')
			{
				$strFolder = '';
			}

			// Create the parent folder
			if (!is_dir($this->strRootDir . '/' . $strFolder))
			{
				new Folder($strFolder);
			}
		}

		// Move the temporary file to its destination
		$return = $this->Files->rename($this->strTmp, $this->strFile);
		$this->strTmp = null;

		// Update the database
		if (Dbafs::shouldBeSynchronized($this->strFile))
		{
			$this->objModel = Dbafs::addResource($this->strFile);
		}

		return $return;
	}
public function close()
	{
		if (\is_resource($this->resFile))
		{
			$this->Files->fclose($this->resFile);
		}

		// Create the file path
		if (!file_exists($this->strRootDir . '/' . $this->strFile))
		{
			// Handle open_basedir restrictions
			if (($strFolder = \dirname($this->strFile)) == '.')
			{
				$strFolder = '';
			}

			// Create the parent folder
			if (!is_dir($this->strRootDir . '/' . $strFolder))
			{
				new Folder($strFolder);
			}
		}

		// Move the temporary file to its destination
		$return = $this->Files->rename($this->strTmp, $this->strFile);
		$this->strTmp = null;

		// Update the database
		if (Dbafs::shouldBeSynchronized($this->strFile))
		{
			$this->objModel = Dbafs::addResource($this->strFile);
		}

		return $return;
	}
Close the file handle

@return boolean True if the operation was successful