Alternative to System.Web.HttpContext.Current when using ProgressBox
2 answers
Yes.
Sitecore.IO.FileUtil.MapPath(string path)
Displays the path of the virtual file to the path of the physical file.
Parameters path - path to the virtual file.
Returned value The physical path to the file.
Remarks If the file path is empty, contains a backslash (), or contains the string ": //", the path is returned.
Example The following example returns the physical name of the file mydata.xml in the data folder. Subsequently, the filename variable stores a value similar to "c: \ inetpub \ wwwroot \ default website \ sitecore \ data \ mydata.xml".
string filename = FileUtil.MapPath("/sitecore/data/mydata.xml");
+3
source to share