Physical path of file in cms 5 r2

Member since: 2007


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...

#26717 Dec 17, 2008 11:01
  • Member since: 1999


    UnifiedFile file = HostingEnvironment.VirtualPathProvider.GetFile(path) as UnifiedFile; Response.Write(file.LocalPath);
    #26740 Dec 17, 2008 17:26
  • Member since: 2007
    Thank you! :)
    #26741 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.
Please login to post a reply