SEToolbox.Support.ToolboxUpdater.ValidateSpaceEngineersInstall C# (CSharp) Method

ValidateSpaceEngineersInstall() public static method

Checks for key directory names from the game bin folder.
public static ValidateSpaceEngineersInstall ( string filePath ) : bool
filePath string
return bool
        public static bool ValidateSpaceEngineersInstall(string filePath)
        {
            if (string.IsNullOrEmpty(filePath))
                return false;
            if (!Directory.Exists(filePath))
                return false;
            if (!Directory.Exists(Path.Combine(filePath, @"..\Content")))
                return false;

            // Validate that all core SE assemblies are present, otherwise it's pointless continuing.
            if (CoreSpaceEngineersFiles.Any(filename => !File.Exists(Path.Combine(filePath, filename))))
            {
                return false;
            }

            // Skip checking for the .exe. Not required for the Toolbox currently.
            return true;
        }