Software / code / prosody
Comparison
core/moduleapi.lua @ 5496:7a0b81b5ca71
moduleapi: Add module:open_store() as a front-end to storagemanager.open()
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 19 Apr 2013 13:29:47 +0100 |
| parent | 5434:9dd36e20c1e3 |
| child | 5498:2a67235e1d4d |
comparison
equal
deleted
inserted
replaced
| 5494:9916f0a2d178 | 5496:7a0b81b5ca71 |
|---|---|
| 335 function api:load_resource(path, mode) | 335 function api:load_resource(path, mode) |
| 336 path = config.resolve_relative_path(self:get_directory(), path); | 336 path = config.resolve_relative_path(self:get_directory(), path); |
| 337 return io.open(path, mode); | 337 return io.open(path, mode); |
| 338 end | 338 end |
| 339 | 339 |
| 340 function api:open_store(name, type) | |
| 341 return storagemanager.open(self.host, name, type); | |
| 342 end | |
| 343 | |
| 340 return api; | 344 return api; |