diff options
author | Remko Tronçon <git@el-tramo.be> | 2014-02-01 11:48:54 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2014-02-02 09:42:58 (GMT) |
commit | f44ea24fda0f08195180215a30bc626d7c1907c5 (patch) | |
tree | a1bb160a98a497dbf01b82bbf559e99b6c1dfad9 /Sluift/core.lua | |
parent | 3d881ddd0b65d3a2bc1213386fb75fd95e4de691 (diff) | |
download | swift-f44ea24fda0f08195180215a30bc626d7c1907c5.zip swift-f44ea24fda0f08195180215a30bc626d7c1907c5.tar.bz2 |
Sluift: Add new_certificate
Change-Id: If4e4ef98c00f15c0a88557860f0377843a8713c0
Diffstat (limited to 'Sluift/core.lua')
-rw-r--r-- | Sluift/core.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Sluift/core.lua b/Sluift/core.lua index 9e81575..48b8a97 100644 --- a/Sluift/core.lua +++ b/Sluift/core.lua @@ -6,7 +6,7 @@ local sluift = select(1, ...) local _G = _G -local pairs, ipairs, print, tostring, type, error, assert, next, rawset, xpcall, unpack = pairs, ipairs, print, tostring, type, error, assert, next, rawset, xpcall, unpack +local pairs, ipairs, print, tostring, type, error, assert, next, rawset, xpcall, unpack, io = pairs, ipairs, print, tostring, type, error, assert, next, rawset, xpcall, unpack, io local setmetatable, getmetatable = setmetatable, getmetatable local string = require "string" local table = require "table" @@ -435,6 +435,13 @@ local function call(options) end end +local function read_file(file) + local f = io.open(file, 'rb') + local result = f:read('*all') + f:close() + return result +end + -------------------------------------------------------------------------------- -- Metatables -------------------------------------------------------------------------------- @@ -1005,6 +1012,7 @@ return { register_get_by_type_index = register_get_by_type_index, process_pubsub_event = process_pubsub_event, tprint = tprint, + read_file = read_file, disco = disco, get_help = get_help, help = help, |