private void GetForests() { bool tmp; SyncRunsPath = GlobalHelper.PathInCurrentDirectory(SyncRunsPath, out tmp); foreach (KeyValuePair <string, string> kvpforest in GlobalHelper.FoldersInPath(SyncRunsPath)) { ForestList.Add(kvpforest.Key, new SyncForest(kvpforest.Key, kvpforest.Value)); } }
public SyncForest AddForest(string name) { name = name.ToFileNameValid(); if (ForestList.ContainsKey(name)) { return(ForestList[name]); } SyncForest ret = new SyncForest(); ret.ForestName = name; ret.ForestPath = Path.Combine(this.SyncRunsPath, name); GlobalHelper.CreateDirectory(ret.ForestPath); ForestList.Add(name, ret); return(ret); }