Skip to main content

I ran into this old question, but maybe this will help someone:

Microsoft.SharePoint.SPFile spFile = Microsoft.SharePoint.SPContext.Current.Web.GetFile( "subcat/test.docx" );

This will get the local file automatically for you, doing most of the work.