Re: Directory/file browser as TreeView
- From: Joe Smith <jes martnet com>
- To: "Ratcliffe, Jeffrey (Peters)" <Jeffrey Ratcliffe External eads com>
- Cc: gtk-perl-list gnome org
- Subject: Re: Directory/file browser as TreeView
- Date: Thu, 28 Sep 2006 09:59:47 -0400
Ratcliffe, Jeffrey (Peters) wrote:
Very good script. :)
Seconded! Nice example.
I was trying to keep it short and simple, but you can replace:
@{$slist->{data}} = <*>;
with
...
Or just
@{$slist->{data}} = grep(-d, <*>);
But anything using "-d" will require an expensive "stat" of each file.
As for speeding up access to large directories, it is well known that
such directory operations are much much faster on the second pass, once
the OS has cached all the inodes in memory. So, you just need a way to
skip the first pass and go right to the second. I can hardly wait for
Perl6 and the quantum spaceship (time-hopping) operator.
Or, probably simpler for now, just do each scan twice.
HTH -- Cheers!
<Joe (... Ducks)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]