public class FileSystem{
// Copy directory structure recursively
public static void copyDirectory(string Src,string Dst){
String[] Files;
if(Dst[Dst.Length-1]!=Path.DirectorySeparatorChar)
Dst+=Path.DirectorySeparatorChar;
if(!Directory.Exists(Dst)) Directory.CreateDirectory(Dst);
Files=Directory.GetFileSystemEntries(Src);
foreach(string Element in Files){
// Sub directories
if(Directory.Exists(Element))
copyDirectory(Element,Dst+Path.GetFileName(Element));
// Files in directory
else
File.Copy(Element,Dst+Path.GetFileName(Element),true);
}
}
}
Difference between Rollup and Cube
14 years ago
No comments:
Post a Comment