ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/bin/treescan
(Generate patch)

Comparing IO-AIO/bin/treescan (file contents):
Revision 1.14 by root, Tue Oct 4 18:33:26 2011 UTC vs.
Revision 1.16 by root, Sat Jan 25 00:15:52 2014 UTC

1#!/opt/bin/perl 1#!/opt/bin/perl
2 2
3# inspired by treescan by Jamie Lokier <jamie@imbolc.ucc.ie> 3# inspired by treescan by Jamie Lokier <jamie@imbolc.ucc.ie>
4# about 40% faster than the original version (on my fs and raid :) 4# about 40% faster than the original version (on my fs and raid :)
5 5
6use strict; 6use common::sense;
7use Getopt::Long; 7use Getopt::Long;
8use Time::HiRes (); 8use Time::HiRes ();
9use IO::AIO; 9use IO::AIO;
10 10
11our $VERSION = $IO::AIO::VERSION; 11our $VERSION = $IO::AIO::VERSION;
65 65
66 aioreq_pri -1; 66 aioreq_pri -1;
67 ++$n_dirs; 67 ++$n_dirs;
68 aio_scandir $path, 8, sub { 68 aio_scandir $path, 8, sub {
69 my ($dirs, $files) = @_ 69 my ($dirs, $files) = @_
70 or warn "$path: $!\n"; 70 or return warn "$path: $!\n";
71 71
72 printfn "", [$path] unless $opt_nodirs; 72 printfn "", [$path] unless $opt_nodirs;
73 printfn $path, $files unless $opt_nofiles; 73 printfn $path, $files unless $opt_nofiles;
74 74
75 $n_files += @$files; 75 $n_files += @$files;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines