On Mon, 2007-09-10 at 00:34 -0700, Erick Tryzelaar wrote:
> I think that pretty much covers everything. So, how shall we do ours? Well, there are lots of things covered by 'filesystem' interaction :) The right way to search for files is probably using an iterator, which is closely related to a stream of strings and/or a channel of strings. Filesystem is just another data structure, that happens not be in memory. SO you could have an iterator which returns union file_entry_t = | Dir of string | File of string ; It is then easy to: filter so only files returned filter so only directories returned stack of iterators for recursing into directories filter based on regexp (using Tre) Could add: | Symlink of string // Unix, Windows also has some weird thing | Special of string // device, blah blah This union is a kitchen sink.. it provides all the possibilities even if any given OS doesn't support them all. This allows algorithm to be coded for all OS which adapts to the OS without knowing which OS it is .. :) -- John Skaller <skaller at users dot sf dot net> Felix, successor to C++: http://felix.sf.net ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language