Add a Lua FileSystem module, an emulation of a subset of the permissively
licensed (MIT) Lua library of the same name[0], to our loader's Lua
environment.
Details
- Reviewers
imp kevans - Commits
- rS329500: Lua loader: Add barebones "lfs" module
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
My lua extension fu is weak, but this looks decent to me.
stand/liblua/lfs.c | ||
---|---|---|
325–332 ↗ | (On Diff #39443) | We need to do this to loader. and os., and maybe check against lua standard libraries to see if there's a more standard set of names if we're off in the weeds. |
Mine too.
stand/liblua/lfs.c | ||
---|---|---|
325–332 ↗ | (On Diff #39443) | Yes, I was about to go ahead and do those cleanups now. :-) |
stand/liblua/lfs.c | ||
---|---|---|
325–332 ↗ | (On Diff #39443) | We should do them as modules, like the standard modules, and maybe lfs should be done that way too... There's a bit of a mismatch between interp_lua stuff an lutils.c lstd.c stuff that likely could benefit from a good going over. See loadedlibs[] in interp_lua for where we do the standard ones. |
stand/liblua/lfs.c | ||
---|---|---|
325–332 ↗ | (On Diff #39443) | Sure, there's room for additional cleanup there. Do you care about the order, cleanup vs adding this module? If I can commit this and the subsequent patch first it keeps my patch stack shorter, which I prefer. |
stand/liblua/lfs.c | ||
---|---|---|
325–332 ↗ | (On Diff #39443) | If it's about the same time, I don't care. I just don't want to get a mess and be stuck with it :( |