Whenever you are in a scenario where you need the location to the SharePoint root directory on the server in the farm that is executing your code, do NOT hardcode the path like the example below:
private const string rootfolder = "C:\\Program Files\\Common Files\\Microsoft Shared\\web server extensions\\14\\";
The location of the SharePoint root directory depends on the configuration during the installation of SharePoint, your code will break if this configuration is different.
As you probably already know, it is a recommended practice to use GetGenericSetupPath available in the static SPUtility class. Please be aware that this method is obsolete in SharePoint 2013 and we have 2 new methods:
This will help you to make sure that your code is generic enough to deal with all scenario’s. For example with site collection upgrade.
Hope it helps!