diff options
Diffstat (limited to 'script/brave/work.lua')
-rw-r--r-- | script/brave/work.lua | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/script/brave/work.lua b/script/brave/work.lua index e1c08a79..6307c777 100644 --- a/script/brave/work.lua +++ b/script/brave/work.lua @@ -24,43 +24,3 @@ brave.on('timer', function (time) brave.push('wakeup') end end) - -brave.on('compile', function (text) - local state, err = parser.compile(text, 'Lua', 'Lua 5.4') - if not state then - log.error(err) - return - end - local lines = parser.lines(text) - return { - root = state.root, - value = state.value, - errs = state.errs, - lines = lines, - } -end) - -brave.on('listDirectory', function (uri) - local path = fs.path(furi.decode(uri)) - local uris = {} - for child in fs.pairs(path) do - local childUri = furi.encode(child:string()) - uris[#uris+1] = childUri - end - return uris -end) - -brave.on('isDirectory', function (uri) - local path = fs.path(furi.decode(uri)) - return fs.is_directory(path) -end) - -brave.on('loadFile', function (uri) - local filename = furi.decode(uri) - return util.loadFile(filename) -end) - -brave.on('saveFile', function (params) - local filename = furi.decode(params.uri) - return util.saveFile(filename, params.text) -end) |