确定是否有文件夹在.NET共享 [英] Determining if a folder is shared in .NET
本文介绍了确定是否有文件夹在.NET共享的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法通过.NET Framework来确定一个文件夹共享或不?
Is there a way through the .net framework to determine if a folder is shared or not?
无论Diretory和DirectoryInfo或FileAttributes似乎有什么相应的字段。
Neither Diretory, DirectoryInfo or FileAttributes seem to have any corresponding field.
有一件事我忘了提及的是,我要做个检查网络共享。但我会调查WMI的东西。
One thing I forgot to mention was that I want to be checking for network shares. But I'll investigate the WMI stuff.
推荐答案
您可以使用WMI Win32_Share。 看一看:
You can use WMI Win32_Share. Take a look at:
http://www.gamedev.net/community/forums/ topic.asp?topic_id = 408923
显示查询,创建和删除共享文件夹的样本。
Shows a sample for querying, creating and deleting shared folders.
这篇关于确定是否有文件夹在.NET共享的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文