In this post we will discuss how we can get the 14 hive file path in SharePoint 2010 using object model.
SPUtility class helps us in finding the 14 hive folder path.
Below is the command to get the path:
string strPath = SPUtility.GetGenericSetupPath("");
This will return like this C:\Program Files\Common Files\Microsoft Shared\web server extensions\14 if you have installed SharePoint in C drive.
Similarly if you want to retrieve the feture path of the 14 hive folder then write like below:
string featureFolderPath = SPUtility.GetGenericSetupPath("template\\features");
If you want to read some SharePoint 2013 articles, then you can check this website