code: public static function isValidFileName($strName)
  	{
  		if ($strName == '')
  		{
  			return false;
  		}
  
  		// Special characters not supported on e.g. Windows
  		if (preg_match('@[\\\\/:*?"<>|]@', $strName))
  		{
  			return false;
  		}
  
  		// Invisible control characters or unused code points
  		if (preg_match('/[\pC]/u', $strName) !== 0)
  		{
  			return false;
  		}
  
  		// Must not be longer than 255 characters
  		if (Utf8::strlen($strName) > 255)
  		{
  			return false;
  		}
  
  		return true;
  	}
docs: Valid file name
  
  @param mixed $strName The file name
  
  @return boolean True if the file name is valid