AdvancedLauncher.Management.ConfigurationManager.CheckUpdateAccess C# (CSharp) Method

CheckUpdateAccess() public method

public CheckUpdateAccess ( GameModel model ) : bool
model AdvancedLauncher.SDK.Model.Config.GameModel
return bool
        public bool CheckUpdateAccess(GameModel model)
        {
            if (model == null) {
                throw new ArgumentException("model argument cannot be null");
            }
            string gameEXE = GetGameEXE(model);
            string pfFile = GetPFPath(model);
            string hfFile = GetHFPath(model);
            if (string.IsNullOrEmpty(gameEXE) || string.IsNullOrEmpty(pfFile) || string.IsNullOrEmpty(hfFile)) {
                return false;
            }

            new FileIOPermission(FileIOPermissionAccess.Read | FileIOPermissionAccess.Write, new string[] { gameEXE, pfFile, hfFile }).Assert();
            return !Utils.IsFileLocked(gameEXE) && !Utils.IsFileLocked(pfFile) && !Utils.IsFileLocked(hfFile);
        }