--[[ Copyright (c) 2012 Kaarle Ritvanen See LICENSE file for license details --]] module(..., package.seeall) local pth = require('acf.path') local map = require('acf.util').map backend = require('acf.object').class() function backend:init() self.aug = require('augeas').init() end function backend:get(path) path = '/'..pth.join(unpack(path)) local _, count = self.aug:match(path) if count == 0 then return end local value = self.aug:get(path) if value ~= nil then return value end return map(pth.name, self.aug:match(path..'/*')) end -- TODO implement set function