var explorer = createObject("component", "CFIDE.componentutils.cfcexplorer"); var target = explorer.normalizePath(arguments.path); var cfcs = explorer.getcfcs(refreshCache); //true == refresh cache var cfc = ""; var i = 1 ; var package = ""; var cfcpath = ""; for(i = 1; i lte arraylen(cfcs); i = i+1){ cfc = cfcs[i]; //Assumes that CF always stores path info with fwd slash //and strip last element to get path. cfcpath = ListDeleteAt(cfc.path, listlen(cfc.path,"/"), "/"); //Array of structs. Doesn't seem possible to do binary search if(cfcpath eq target){ package = cfc.package; break; } } return package;