* Timothy S. Nelson (wayl...@wayland.id.au) [090218 03:08]:
> On Tue, 17 Feb 2009, Richard Hainsworth wrote:
> >Moreover, if perl6 distinguishes between a location and a file, then the 
> >spec can distinguish between a .children() method that provides a list of 
> >child locations (viz., sub-directories) and .files(), which provides a 
> >list of the contents of the location.
> 
>       Keep in mind that files and directories are also not the only things 
> in a filesystem.  There are links, devices, pipes, and others to worry 
> about. Which is why I prefer my solution.

A directory contains "entries" (not children).  A $directory->list()
could return these children.  Unless you ask for the type, mtime, or
such (hidden stat) it should stay abstract for reasons of performance.
On the other hand, you are also not allowed to cache the knowledge
without regular verification, because facts may change.

The designed interface should focus on what you want to do with the
OS, on (as abstract as possible) actions.
-- 
Regards,
               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                MARKOV Solutions
       m...@overmeer.net                          soluti...@overmeer.net
http://Mark.Overmeer.net                   http://solutions.overmeer.net

Reply via email to