예제 #1
0
        public IEnumerable<ProgressInfo> AbstractCopy(AbstractFolder nodeElement)
        {
            var count = h_countFiles(this);

            var progressInfo = new ProgressInfo
            {
                All = count
            };

            Directory.CreateDirectory(nodeElement.AbstractPath);

            foreach (var item in FilesList)
            {
                var destination = nodeElement.AbstractCreateFile(item.AbstractName);
                item.AbstractCopy(destination);
                progressInfo.Current++;

                yield return progressInfo;
            }
            foreach (var item in DirectoriesList)
            {
                var createdFolder = nodeElement.AbstractCreateFolder(item.AbstractName);
                foreach (var innerItem in item.AbstractCopy(createdFolder))
                {
                    yield return innerItem;
                }
                progressInfo.Current++;

                yield return progressInfo;
            }
        }
예제 #2
0
 public override void AbstractReplace(AbstractFolder inDirectory)
 {
     var abstractFolder = inDirectory.AbstractCreateFolder(AbstractName);
     AbstractCopy(abstractFolder);
     AbstractRemove();
 }