public static PhysicalFolder CreateEmptyFolder(string rootPath, PhysicalFolderDeleteType deleteType)
        {
            if (Directory.Exists(rootPath) == false)
            {
                Directory.CreateDirectory(rootPath);
                while (Directory.Exists(rootPath) == false)
                {
                    Thread.Sleep(10);
                }
            }

            RemoveSubDirectoriesAndFilesInRootDirectory(rootPath);

            return(new PhysicalFolder(rootPath, deleteType));
        }
        public static PhysicalFolder Create(string rootPath, PhysicalFolderDeleteType deleteType, params INode[] nodes)
        {
            if (Directory.Exists(rootPath) == false)
            {
                Directory.CreateDirectory(rootPath);
                while (Directory.Exists(rootPath) == false)
                {
                    Thread.Sleep(10);
                }
            }

            RemoveSubDirectoriesAndFilesInRootDirectory(rootPath);

            var physicalFolder = new PhysicalFolder(rootPath, deleteType);

            foreach (var node in nodes.Where(Empty.NotMatch))
            {
                node.CreateTo(physicalFolder);
            }

            return(physicalFolder);
        }
 public PhysicalFolder(string rootPath, PhysicalFolderDeleteType deleteType)
 {
     FullPath   = rootPath;
     DeleteType = deleteType;
 }