C#IO操作之重命名目录操作
2010年5月9日
没有评论
与操作文件 类似源码如下:
string path = Path.GetTempPath() + "MyTemp";
string newpath = path + "1";
Directory.CreateDirectory(path);
RenameDirectory(path, newpath);
DirectoryInfo dirInfo = new DirectoryInfo(newpath);
dirInfo.Rename(path);
。。。。。