For the record, the file loader (used when creating devices) and the HTTP server, when servicing file requests, use this search order:
local f = open "openLuup/" -- 2016.06.18 look in openLuup/ (for AltAppStore)
or open "./" -- current directory (cmh-ludl/)
or open "../cmh-lu/" -- look in 'cmh-lu/' directory
or open "files/" -- 2016.06.09 also look in files/
or open "www/" -- 2018.02.15 also look in www/
Some XML files are also cached (see the new Console > Files > Cache page) and the cache is tried first before the physical file system. This does mean, as mentioned elsewhere, that a change in a physical file which has been cached will not be seen until the next restart.
During the (long) development of openLuup, I moved away from trying to emulate exactly some of the Vera file structure and revert to a system which tries to contain all the openLuup related files to sub-folders in /cmh-ludl/.
The file server, however, tries to be smart, and some file locations, often requested by AltUI (for example) are aliased to local folders. The icon search paths:
local dir_alias = {
["cmh/skins/default/img/devices/device_states/"] = "icons/", -- redirect UI7 icon requests
["cmh/skins/default/icons/"] = "icons/", -- redirect UI5 icon requests
["cmh/skins/default/img/icons/"] = "icons/" , -- 2017.11.14
}
and CGIs:
["cgi-bin/cmh/backup.sh"] = "openLuup/backup.lua",
["cgi-bin/cmh/sysinfo.sh"] = "openLuup/sysinfo.lua",
["console"] = "openLuup/console.lua",
-- graphite_api support
["metrics"] = graphite_cgi,
["metrics/find"] = graphite_cgi,
["metrics/expand"] = graphite_cgi,
["metrics/index.json"] = graphite_cgi,
["render"] = graphite_cgi,
So it’s a mess, for good reasons, but it’s less of a mess than Vera.