Question by email:
Is it possible to see where the actual physical file exists from the sharepoint manager 2007 tool?
Meaning, say I have a feature that adds a masterpage to a site collection master page gallery.
If I drill down in the spm tool I can see that it is uncustomized and exists at location “_catalogs/whatever”
But I don’t see anything about it actually pointing to the file in the features directory.
To find out where a file is stored you should first check the SPFile.CustomizedPageStatus of the file in question to determine if the file is still linked to the source file or has been customized and now resides in the database. For a master page you would get the correct SPFile object either by using SPWeb.GetFile([url_of_masterpage]). Checking the CustomizedPageStatus will return an SPCustomizedPageStatus enum that tell you if the file has been customized (SPCustomizedPageStatus.Customized) or is un-customized (SPCustomizedPageStatus.Uncustomized).
If the file is uncustomized, what was previously known as ghosted, you can check the masterpage’s SPFile.Properties collection for the vti_setuppath property.
Of course, all of these properties are browsable using SPM 2007. Remember, however, that the SPFile objects are stored in the root folder SPFolder of the web, and that you must browse your way down to the correct file in the folder structure (_catalogs/masterpages/default.master for example). Expand that file and you will see the properties collection and the vti_setuppath property specifically.
Note that the vti_setuppath is always relative to the \TEMPLATE folder, even if you deploy your module and file using the Path method of addressing storage.
Found this article valuable? Want to show your appreciation? Here are some options:
a) Click on the banners anywhere on the site to visit my blog's sponsors. They are all hand-picked and are selected based on providing great products and services to the SharePoint community.
b) Donate Bitcoins! I love Bitcoins, and you can donate if you'd like by clicking the button below.
c) Spread the word! Below, you should find links to sharing this article on your favorite social media sites. I'm an attention junkie, so sharing is caring in my book!