This topic has not yet been rated - Rate this topic

SPUtility.GetGenericSetupPath Method

Retrieves the full local path for the specified subdirectory.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)]
public static string GetGenericSetupPath(
	string strSubdir
)

Parameters

strSubdir
Type: System.String
A string that contains the Web site-relative URL for the subdirectory. For example, Lists/Announcements.

Return Value

Type: System.String
A string that contains the full local path. For example, %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\Lists and %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\Lists\Announcements.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Misleading example
The example given above is confusing. There is no "Lists\Annoucements" folder in the SharePoint root folder. A more appropriate example would have used "TEMPLATE\FEATURES" or some other path in the root folder instead. Giving "Lists\Annoucements" makes you think it is building a path to content files.