SPUtility.GetGenericSetupPath Method
Retrieves the full local path for the specified subdirectory.
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.StringA 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.
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.
- 10/21/2010
- PaulE