I need to save the spfile in a physical location. for drive: c.
I get the file using the following code:
using (SPSite site = new SPSite(item.Web.Site.ID))
{
using (SPWeb web = site.OpenWeb(item.Web.ServerRelativeUrl))
{
SPFile file = web.GetFile(item.File.UniqueId);
}
}
Now, how to save the file in a physical location. enter the code.
source
share