On Wed, Feb 15, 2012 at 11:50:47AM +0200, steve donovan wrote:
Hi all,
Inspired by Jay's challenge to keep it simple& stupid, I've come up
with thirty-odd functions that cover a lot of the general boilerplate
code we end up writing. 'Microlight' because it's the trimmed-down
younger brother of Penlight, about 500 lines in total, of which 160
are doc comments.
https://gist.github.com/1834789
And the extracted docs are at
http://stevedonovan.github.com/microlight/
splitpath (P)
split a file path. if there's no directory part, the first value will be
the empty string
Parameters:
P: A file path
This can't possibly be portable, and is already covered by
LuaFileSystem, no? Beyond the usual UNIX, Windows and MacOS, there are
esoteric OSes which Lua is popular on such as RISC OS that have truely
baroque syntax. The BNF for RISC OS's path syntax is possibly longer
than that of Lua's.