line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package File::VirusScan::Engine; |
2
|
23
|
|
|
23
|
|
97008
|
use strict; |
|
23
|
|
|
|
|
50
|
|
|
23
|
|
|
|
|
564
|
|
3
|
23
|
|
|
23
|
|
108
|
use warnings; |
|
23
|
|
|
|
|
38
|
|
|
23
|
|
|
|
|
525
|
|
4
|
23
|
|
|
23
|
|
114
|
use Carp; |
|
23
|
|
|
|
|
39
|
|
|
23
|
|
|
|
|
1047
|
|
5
|
|
|
|
|
|
|
|
6
|
23
|
|
|
23
|
|
8808
|
use IO::Dir; |
|
23
|
|
|
|
|
222315
|
|
|
23
|
|
|
|
|
1010
|
|
7
|
23
|
|
|
23
|
|
142
|
use IO::File; |
|
23
|
|
|
|
|
45
|
|
|
23
|
|
|
|
|
2360
|
|
8
|
|
|
|
|
|
|
|
9
|
23
|
|
|
23
|
|
124
|
use base qw( Class::Accessor::Fast ); |
|
23
|
|
|
|
|
42
|
|
|
23
|
|
|
|
|
10232
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub list_files |
12
|
|
|
|
|
|
|
{ |
13
|
6
|
|
|
6
|
1
|
9117
|
my ($self, $path) = @_; |
14
|
|
|
|
|
|
|
|
15
|
6
|
100
|
|
|
|
84
|
if(!-d $path) { |
16
|
1
|
|
|
|
|
10
|
return $path; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
5
|
|
|
|
|
46
|
my $dir = IO::Dir->new($path); |
20
|
5
|
50
|
|
|
|
635
|
if(!$dir) { |
21
|
0
|
|
|
|
|
0
|
croak "Could not open directory $path: $!"; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
5
|
|
|
|
|
14
|
my @files; |
25
|
|
|
|
|
|
|
|
26
|
5
|
|
|
|
|
27
|
for my $name ($dir->read) { |
27
|
15
|
100
|
100
|
|
|
262
|
next if($name eq '.' || $name eq '..'); |
28
|
5
|
|
|
|
|
28
|
my $full_name = "$path/$name"; |
29
|
5
|
100
|
|
|
|
73
|
if(-f $full_name) { |
|
|
50
|
|
|
|
|
|
30
|
3
|
|
|
|
|
18
|
push @files, $full_name; |
31
|
|
|
|
|
|
|
} elsif(-d _ ) { |
32
|
2
|
|
|
|
|
32
|
push @files, $self->list_files($full_name); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
5
|
|
|
|
|
18
|
$dir->close; |
37
|
5
|
|
|
|
|
95
|
return @files; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
__END__ |