问题描述
是否可以通过编程方式获取12个Hive的目录路径?我正在创建一个功能,该功能可以将文件传送到12个配置单元中的XML目录,并且我不想在我的代码中对目录路径进行硬编码.
Is there any way to get the directory path of the 12 Hive programmatically?I am creating a feature which delivers a file to the XML directory in the 12 hive, and I don't want to hardcode the directory path in my code.
是否存在任何将12个Hive目录路径字符串作为属性公开的对象模型属性?
Is there any Object Model property which exposes the 12 Hive directory path string as a property?
推荐答案
您可以使用Microsoft.SharePoint.Utilities.SPUtility.GetGenericSetupPath()方法.有关更多信息,请参见WSS SDK: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputility.getgenericsetuppath.aspx
You can use the Microsoft.SharePoint.Utilities.SPUtility.GetGenericSetupPath() method. See for more information the WSS SDK: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputility.getgenericsetuppath.aspx
这篇关于以编程方式获取12个Hive的目录路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!