[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: A Batteries API specification (was Re: LuaDEAL - Lua DEad Alive Libraries)
- From: Sean Conner <sean@...>
- Date: Tue, 21 Jan 2020 16:57:13 -0500
It was thus said that the Great nobody once stated:
> On 21/01/2020 06.38, Sean Conner wrote:
> >Okay, let's see if the community can just come together to define the
> >minimum viable module for directory functions. […]
> >
> > cat = list([name])
> >
> > Obtain a list of files in the given directory; if not given,
> > use the current working directory. Return an array of
> > names, or nil on error (error reporting TBD).
> >
> > NOTE: The ordering of entries is unspecified.
> > None of modules I've listed have this specific
> > functionality.
> >
> > fun,state,var = glist([name])
> >
> > Returns an interator (function, state, var) for use in a for
> > statement. Each time the function is called, a new filename
> > is returned.
> >
> > NOTE: The ordering of entries is unspecified.
> > All three modules have this function, although
> > it's called files() under luaposix.
>
> What should happen with '.' and '..'?
Ooh, I forgot to mention that. The parent and current directory markers
("." and ".." on POSIX systems; I think they're the same on Windows?) should
be removed.
> Should they be excluded?
If the concept exists for the system, yes.
-spc