public function protect()
	{
		@trigger_error('Using DC_Folder::protect() has been deprecated and will no longer work in Contao 5.0. Use Contao\Folder::protect() and Contao\Folder::unprotect() instead.', E_USER_DEPRECATED);

		if (!is_dir($this->strRootDir . '/' . $this->intId))
		{
			throw new InternalServerErrorException('Resource "' . $this->intId . '" is not a directory.');
		}

		// Protect or unprotect the folder
		if (file_exists($this->strRootDir . '/' . $this->intId . '/.public'))
		{
			$objFolder = new Folder($this->intId);
			$objFolder->protect();

			$this->import(Automator::class, 'Automator');
			$this->Automator->generateSymlinks();

			$this->log('Folder "'.$this->intId.'" has been protected', __METHOD__, TL_FILES);
		}
		else
		{
			$objFolder = new Folder($this->intId);
			$objFolder->unprotect();

			$this->import(Automator::class, 'Automator');
			$this->Automator->generateSymlinks();

			$this->log('The protection from folder "'.$this->intId.'" has been removed', __METHOD__, TL_FILES);
		}

		$this->redirect($this->getReferer());
	}