UnifiedFile PhysicalPath

Vote:
 
Does anyone know a good way to get the PhysicalPath to a file with UnifiedFileSystem? I'm using a shared upload folder on a load balanced system. I can use file.Parent.Configuration.CustomSettings("PhysicalPath") but thats only giving me the root and not the subfolder Images. img = "/upload/Images/pic.jpg"; UnifiedFile file = UnifiedFileSystem.GetFile(img); path = file?????
#12244
Mar 21, 2005 11:33
Vote:
 
I dont know if this will help you or not. Its from the book: foreach (EPiServer.FileSystem.Handler.HandlerConfiguration HandlerConfig in EPiServer.FileSystem.UnifiedFileSystem.Configuration.Handlers) { System.Collections.IDictionaryEnumerator FsConfigSetting = HandlerConfig.CustomSettings.GetEnumerator(); while (FsConfigSetting.MoveNext()) { Label1.Text += FsConfigSetting.Key + "\t" + FsConfigSetting.Value + "
"; } Label1.Text += HandlerConfig.FS.GetRootDirectory().Name + "
"; Label1.Text += HandlerConfig.IsVirtualShare + "
"; Label1.Text += HandlerConfig.VirtualName + "
"; } page 263 From this you can get the PhysicalPath regardless of file system... hope it helps!
#13913
Mar 21, 2005 12:53
Vote:
 
Just remember that there might not be any physical path. With an Unified File System, the files could be stored anywhere (like in a database). Depending on the file system implementation. /Steve
#13914
Mar 29, 2005 23:53
* 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.