Re: [AD] Splitting filesystem APIs

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sun April 19 2009, Christopher Bludau wrote:
> <snip>
>
> I didn't check the reasons to change the api (I only read quickly over
> them).
>
> But when reading this discussion there was one question that popped up
> in my mind (probably totally unrelated to this discussion):
> Will a zip file or (or any container which can contain files and
> directories) be a directory or a file?
>
> Another thing that I came up with is this. I think it would be pretty
> neat to do something like this (pseudo code)
>
> entry_list = get_all_entries_from_dir(dir);
> foreach(entry in entry_list)
> {
>     if (entry is file)
>        //do something with a file
>     else if (entry is dir)
>        // do something with dir
> }

Thats how it was supposed to work. And with a zip file addon it should be 
possible to do that even if there was a zip in the path. But thats up to whom 
ever writes that addon.

> Will there be a way to do something like this after the change?
> If not, it would not be to bad. Just would like to know if something
> like this will be possible after the change.
>
> I have no opinion on which way is better, yet. Both have pros and cons.
> Just wanted to ask this questions.
>
> Christopher
>
> ---------------------------------------------------------------------------
>--- Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p


-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/