Software /
code /
prosody
Comparison
util/pluginloader.lua @ 5072:586c9106a106
util.pluginloader: Expose load_file
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 01 Aug 2012 01:27:31 +0100 |
parent | 5021:85b2689dbcfe |
child | 5073:ecc89a60b2ba |
comparison
equal
deleted
inserted
replaced
5071:0382f456ac82 | 5072:586c9106a106 |
---|---|
18 local loadstring, pairs = loadstring, pairs; | 18 local loadstring, pairs = loadstring, pairs; |
19 local envload = require "util.envload".envload; | 19 local envload = require "util.envload".envload; |
20 | 20 |
21 module "pluginloader" | 21 module "pluginloader" |
22 | 22 |
23 local function load_file(names) | 23 function load_file(names) |
24 local file, err, path; | 24 local file, err, path; |
25 for i=1,#plugin_dir do | 25 for i=1,#plugin_dir do |
26 for j=1,#names do | 26 for j=1,#names do |
27 path = plugin_dir[i]..names[j]; | 27 path = plugin_dir[i]..names[j]; |
28 file, err = io_open(path); | 28 file, err = io_open(path); |