Пример #1
0
        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));
            }
        }
Пример #2
0
        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);
        }