lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

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.
> And the extracted docs are at

splitpath (P)
	split a file path. if there's no directory part, the first value will be
	the empty string
		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.