创建和删除目录 [英] create and delete directory
本文介绍了创建和删除目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我写这段代码
i write this code
pathString = @"D:\project\test";
System.IO.Directory.CreateDirectory(pathString);
System.IO.Directory.Delete(pathString);
http://imageshack.us/photo/my-images/211/2wg.gif/ [<一个href =http://imageshack.us/photo/my-images/211/2wg.gif/\"target =_ blanktitle =新窗口> ^ ]
将
访问被拒绝当程序到达第三行时
i不知道问题在哪里
相同的程序创建目录然后我不知道为什么不能删除它?
任何想法?
http://imageshack.us/photo/my-images/211/2wg.gif/[^]
will
access denied when the program comes to the third line
i don't know where the problem
the same program creates the directory then i don't know why can't delete it?
any idea?
推荐答案
解决方法: http://stackoverflow.com/ questions / 1701457 / directory-delete-doesnt-work-access-denied-error-but-under-windows-explorer-it [ ^ ]
这篇关于创建和删除目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文