Nexus.Client.ModManagement.CategoryManager.IsValid C# (CSharp) Method

IsValid() protected static method

Determines if the category file at the given path is valid.
protected static IsValid ( string p_strCategoryPath ) : bool
p_strCategoryPath string The path of the category file to validate.
return bool
		protected static bool IsValid(string p_strCategoryPath)
		{
			if (!File.Exists(p_strCategoryPath))
				return false;
			try
			{
				XDocument docCategory = XDocument.Load(p_strCategoryPath);
			}
			catch (Exception e)
			{
				Trace.TraceError("Invalid Category File ({0}):", p_strCategoryPath);
				Trace.Indent();
				TraceUtil.TraceException(e);
				Trace.Unindent();
				return false;
			}
			return true;
		}