| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Filesys::Type::Plugin::Windows; |
|
2
|
1
|
|
|
1
|
|
893
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
384
|
|
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
our $VERSION = 0.02; |
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub new { |
|
7
|
1
|
|
|
1
|
0
|
18
|
my $pkg = shift; |
|
8
|
|
|
|
|
|
|
|
|
9
|
1
|
50
|
|
|
|
6
|
return undef unless $^O =~ /win/i; |
|
10
|
|
|
|
|
|
|
|
|
11
|
0
|
|
|
|
|
|
eval { |
|
12
|
0
|
|
|
|
|
|
require Win32; |
|
13
|
0
|
|
|
|
|
|
require Cwd; |
|
14
|
0
|
|
|
|
|
|
require File::Spec; |
|
15
|
|
|
|
|
|
|
}; |
|
16
|
0
|
0
|
|
|
|
|
return undef if $@; |
|
17
|
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
bless {}, $pkg; |
|
19
|
|
|
|
|
|
|
} |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
our ($dest,$err); |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub fstype { |
|
24
|
0
|
|
|
0
|
0
|
|
my ($self,$path) = @_; |
|
25
|
|
|
|
|
|
|
|
|
26
|
0
|
|
|
|
|
|
my $cur = Cwd::cwd; |
|
27
|
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
eval { |
|
29
|
0
|
|
|
|
|
|
my ($vol,$dir,$file) = File::Spec->splitpath($path); |
|
30
|
0
|
|
|
|
|
|
$dest = File::Spec->catpath($vol,$dir); |
|
31
|
|
|
|
|
|
|
}; |
|
32
|
0
|
0
|
|
|
|
|
($err = $@) && return undef; |
|
33
|
0
|
0
|
|
|
|
|
chdir $dest or return undef; |
|
34
|
0
|
|
|
|
|
|
my $fstype = Win32::FsType(); |
|
35
|
0
|
|
|
|
|
|
chdir $cur; |
|
36
|
0
|
|
|
|
|
|
$fstype; |
|
37
|
|
|
|
|
|
|
} |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub diagnose { |
|
40
|
0
|
|
|
0
|
0
|
|
$err . "\nWorking directory: ".$dest; |
|
41
|
|
|
|
|
|
|
} |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |