[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: (followup) Re: [despammed] Best way to recursive folders?
From:       Esben Mose Hansen <esben () despammed ! com>
Date:       2003-05-04 19:58:47
[Download RAW message or body]

On Sunday 04 May 2003 20:22, Mosfet wrote:
> I mean it's okay in that it works, I just don't know if users will demand
> symbolic links to folders be followed or not ;-)
>
> My current implementation uses lstat, which will cause symbolic links to
> not be recognized in S_ISDIR(), so the link is never added into the list of
> folders to process.

Ignoring symlinked directories would be a surprising behaviour from a program, 
I'm afraid :-/ Perhaps you could insert the inode number in your list and 
skip any directories whose inodes was already in there? It would probably be 
worth it to keep this list sorted. The "right" implementation would be a hash 
of list, of course, but that's probably not worth the bother unless you have 
such a hash implementation lying around.

-- 
regards, Esben

esben@despammed.com *---* http://home.worldonline.dk/~mesben


 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic