code: protected function isProtectedPath($path)
  	{
  		$rootDir = System::getContainer()->getParameter('kernel.project_dir');
  
  		do
  		{
  			if (file_exists($rootDir . '/' . $path . '/.public'))
  			{
  				return false;
  			}
  
  			$path = \dirname($path);
  		}
  		while ($path != '.');
  
  		return true;
  	}
docs: Check if a path is protected (see #287)
  
  @param string $path
  
  @return boolean