Inside a given Orchard module, how to determine the path to the physical directory where that module is installed?
In alternative, how to programatically determine the Module's name?
Inside a given Orchard module, how to determine the path to the physical directory where that module is installed?
In alternative, how to programatically determine the Module's name?
You can retrieve the module name twofold:
Or use reflection and get the name from the currently executing assembly, which is named like your module:
Assembly.GetExecutingAssembly().GetName().Name
If you have the name, getting the physical directory is as easy as writing:
HostingEnvironment.MapPath(@"~/Modules/" + moduleName)