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);
}