SharePoint : Get file system path.

While developing solutions for SharePoint we sometimes need to deploy files to the file system (14 hive in SharePoint 2010). Suppose we have a file named NavigationMap.xml and we deploy it to LAYOUTS\NavigationWebpart\XML folder using SharePoint Mapped folder options. Now, inside the code we need to get hold of this Xml file. This can be done by using GetGenericSetupPath method of SPUtility class as shown below: