private void RemoveReadOnlyPropertiey() { string FolderPath = ASFRootPath.TrimEnd('\\') + @"\Tests\environments"; var di = new DirectoryInfo(FolderPath); var tmp = di.GetFiles("*", SearchOption.AllDirectories).Select(e => { e.Attributes &= ~FileAttributes.ReadOnly; return(e); }).ToArray(); }
private void ExecuteLoadCommand() { if (!IsRootPathValidate()) { MessageBox.Show("Invalidate ASF Root Path. Please make sure Regression, TestAPI, Environments Folders exist under ASF Root Path: ${ASFRootPath}"); return; } ASFRootPath = ASFRootPath.TrimEnd('\\'); RemoveReadOnlyPropertiey(); RootPathSetter.SetRootPath(new RootPathMessage(ASFRootPath, HypervisorAccess.ATRType.Xenserver)); Components = new ObservableCollection <string>(Directory.EnumerateDirectories(ASFRootPath + @"\Tests\regression").Where(c => !c.Contains("Common")).ToList()); }