Physical path of file in cms 5 r2



How can I get the physical path of pagefiles that are located outside the sites directory? I've been looking at the thread but the UnifiedFileSystem no longer exists in cms 5, and I can't find the appropriate way to do it in this version. Using the MapPath methods just adds the file's virtual path to the site's physical path, and that's not where the file is...

Dec 17, 2008 11:01


UnifiedFile file = HostingEnvironment.VirtualPathProvider.GetFile(path) as UnifiedFile; Response.Write(file.LocalPath);
Dec 17, 2008 17:26
Thank you! :)
Dec 17, 2008 17:35
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.