line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package VCS::Vss::Dir;
|
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
6
|
use Carp;
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
70
|
|
4
|
1
|
|
|
1
|
|
6
|
use VCS::Vss;
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
25
|
|
5
|
1
|
|
|
1
|
|
803
|
use Win32::OLE;
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
@ISA = qw(VCS::Vss VCS::Dir);
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
use strict;
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use Win32::OLE::Enum;
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new {
|
14
|
|
|
|
|
|
|
my($class, $url) = @_;
|
15
|
|
|
|
|
|
|
my $self = $class->init($url);
|
16
|
|
|
|
|
|
|
$self->_fix_path;
|
17
|
|
|
|
|
|
|
#$self->{vss_object} = $self->_get_vss_item($self->path);
|
18
|
|
|
|
|
|
|
return $self;
|
19
|
|
|
|
|
|
|
}
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub content {
|
23
|
|
|
|
|
|
|
my ($self) = @_;
|
24
|
|
|
|
|
|
|
my @return;
|
25
|
|
|
|
|
|
|
my $vss_proj = $self->vss_object;
|
26
|
|
|
|
|
|
|
my @items = Win32::OLE::Enum->All($vss_proj->Items(0));
|
27
|
|
|
|
|
|
|
foreach my $item (@items) {
|
28
|
|
|
|
|
|
|
my $type = $item->{Type};
|
29
|
|
|
|
|
|
|
my $path = $item->{Name};
|
30
|
|
|
|
|
|
|
next unless $path;
|
31
|
|
|
|
|
|
|
my $new_class = ($type eq 0) ? 'VCS::Vss::Dir' : 'VCS::Vss::File';
|
32
|
|
|
|
|
|
|
push @return, $new_class->new($self->url . $path);
|
33
|
|
|
|
|
|
|
}
|
34
|
|
|
|
|
|
|
return sort { $a->path cmp $b->path } @return;
|
35
|
|
|
|
|
|
|
}
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1;
|