使用C#保存文件夹 [英] Save a folder using C#

查看:81
本文介绍了使用C#保存文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想做一个保存功能,允许用户保存文件夹.我有什么办法吗?

我正在使用WPF和C#.我只发现system.windows.forms中使用FolderBrowserDialog.还有其他方法吗?

谢谢.

Hi,

I am want to make a save function that allows user to save the folder. Is there any way for me to do it?

I am using WPF and C#. I only found that the use of FolderBrowserDialog which is in the system.windows.forms. Is that got any others way?

Thank.

推荐答案

[ ^ ]您在寻找什么?
Is this[^] what you are looking for?


您需要检查文件夹是否存在并采取相应措施.您需要研究System.IO命名空间,更具体地说,是Directory对象.在其中查看时,您也可以查看File对象.
You need to check to see if the folder exists and act accordingly. You need to research the System.IO namespace, and more specifically, the Directory object. While you''re in there looking at that, you may as well look at the File object, too.


尝试以下操作:
如何:将文件保存到文件夹 [
Try this:
How to: Save a File to a Folder[^]


这篇关于使用C#保存文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆