确定是否有文件夹在.NET共享夹在、文件、NET

由网友(天龙王府)分享简介:有没有办法通过.NET Framework来确定一个文件夹共享或不?Is there a way through the .net framework to determine if a folder is shared or not?无论Diretory和DirectoryInfo或FileAttributes似...

有没有办法通过.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.

阅读全文

相关推荐

最新文章