|  line  | 
 stmt  | 
 bran  | 
 cond  | 
 sub  | 
 pod  | 
 time  | 
 code  | 
| 
1
 | 
  
 
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #  | 
| 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # (c) Jan Gehring   | 
| 
3
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #  | 
| 
4
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
5
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 package Rex::Interface::Fs::Local;  | 
| 
6
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
7
 | 
53
 | 
 
 | 
 
 | 
  
53
  
 | 
 
 | 
1338
 | 
 use v5.12.5;  | 
| 
 
 | 
53
 | 
 
 | 
 
 | 
 
 | 
 
 | 
332
 | 
    | 
| 
8
 | 
53
 | 
 
 | 
 
 | 
  
53
  
 | 
 
 | 
480
 | 
 use warnings;  | 
| 
 
 | 
53
 | 
 
 | 
 
 | 
 
 | 
 
 | 
206
 | 
    | 
| 
 
 | 
53
 | 
 
 | 
 
 | 
 
 | 
 
 | 
4870
 | 
    | 
| 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
10
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 our $VERSION = '1.14.2.3'; # TRIAL VERSION  | 
| 
11
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
12
 | 
53
 | 
 
 | 
 
 | 
  
53
  
 | 
 
 | 
875
 | 
 use Rex::Interface::Fs::Base;  | 
| 
 
 | 
53
 | 
 
 | 
 
 | 
 
 | 
 
 | 
215
 | 
    | 
| 
 
 | 
53
 | 
 
 | 
 
 | 
 
 | 
 
 | 
791
 | 
    | 
| 
13
 | 
53
 | 
 
 | 
 
 | 
  
53
  
 | 
 
 | 
2371
 | 
 use base qw(Rex::Interface::Fs::Base);  | 
| 
 
 | 
53
 | 
 
 | 
 
 | 
 
 | 
 
 | 
210
 | 
    | 
| 
 
 | 
53
 | 
 
 | 
 
 | 
 
 | 
 
 | 
7678
 | 
    | 
| 
14
 | 
53
 | 
 
 | 
 
 | 
  
53
  
 | 
 
 | 
769
 | 
 use Rex::Helper::File::Stat;  | 
| 
 
 | 
53
 | 
 
 | 
 
 | 
 
 | 
 
 | 
168
 | 
    | 
| 
 
 | 
53
 | 
 
 | 
 
 | 
 
 | 
 
 | 
772
 | 
    | 
| 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
16
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub new {  | 
| 
17
 | 
1260
 | 
 
 | 
 
 | 
  
1260
  
 | 
  
0
  
 | 
5648
 | 
   my $that  = shift;  | 
| 
18
 | 
1260
 | 
 
 | 
  
 33
  
 | 
 
 | 
 
 | 
10713
 | 
   my $proto = ref($that) || $that;  | 
| 
19
 | 
1260
 | 
 
 | 
 
 | 
 
 | 
 
 | 
11976
 | 
   my $self  = $proto->SUPER::new(@_);  | 
| 
20
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
21
 | 
1260
 | 
 
 | 
 
 | 
 
 | 
 
 | 
4386
 | 
   bless( $self, $proto );  | 
| 
22
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
23
 | 
1260
 | 
 
 | 
 
 | 
 
 | 
 
 | 
4787
 | 
   return $self;  | 
| 
24
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
25
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
26
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub upload {  | 
| 
27
 | 
3
 | 
 
 | 
 
 | 
  
3
  
 | 
  
0
  
 | 
22
 | 
   my ( $self, $source, $target ) = @_;  | 
| 
28
 | 
3
 | 
 
 | 
 
 | 
 
 | 
 
 | 
101
 | 
   $self->cp( $source, $target );  | 
| 
29
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
30
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
31
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub download {  | 
| 
32
 | 
  
0
  
 | 
 
 | 
 
 | 
  
0
  
 | 
  
0
  
 | 
0
 | 
   my ( $self, $source, $target ) = @_;  | 
| 
33
 | 
  
0
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
0
 | 
   $self->cp( $source, $target );  | 
| 
34
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
35
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
36
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub ls {  | 
| 
37
 | 
3
 | 
 
 | 
 
 | 
  
3
  
 | 
  
0
  
 | 
577
 | 
   my ( $self, $path ) = @_;  | 
| 
38
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
39
 | 
3
 | 
 
 | 
 
 | 
 
 | 
 
 | 
7
 | 
   my @ret;  | 
| 
40
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
41
 | 
3
 | 
 
 | 
 
 | 
 
 | 
 
 | 
7
 | 
   eval {  | 
| 
42
 | 
3
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
150
 | 
     opendir( my $dh, $path ) or die("$path is not a directory");  | 
| 
43
 | 
3
 | 
 
 | 
 
 | 
 
 | 
 
 | 
141
 | 
     while ( my $entry = readdir($dh) ) {  | 
| 
44
 | 
33
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
154
 | 
       next if ( $entry =~ /^\.\.?$/ );  | 
| 
45
 | 
27
 | 
 
 | 
 
 | 
 
 | 
 
 | 
88
 | 
       push @ret, $entry;  | 
| 
46
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
47
 | 
3
 | 
 
 | 
 
 | 
 
 | 
 
 | 
76
 | 
     closedir($dh);  | 
| 
48
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   };  | 
| 
49
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
50
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   # failed open directory, return undef  | 
| 
51
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
52
 | 
3
 | 
  
 50
  
 | 
  
 33
  
 | 
 
 | 
 
 | 
23
 | 
   die "Error listing directory content ($path)"  | 
| 
53
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     if ( $@ && Rex::Config->get_autodie );  | 
| 
54
 | 
3
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
14
 | 
   if ($@) { return; }  | 
| 
 
 | 
  
0
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
0
 | 
    | 
| 
55
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
56
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   # return directory content  | 
| 
57
 | 
3
 | 
 
 | 
 
 | 
 
 | 
 
 | 
23
 | 
   return @ret;  | 
| 
58
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
59
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
60
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub rmdir {  | 
| 
61
 | 
3
 | 
 
 | 
 
 | 
  
3
  
 | 
  
0
  
 | 
20
 | 
   my ( $self, @dirs ) = @_;  | 
| 
62
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
63
 | 
3
 | 
 
 | 
 
 | 
 
 | 
 
 | 
31
 | 
   Rex::Logger::debug( "Removing directories: " . join( ", ", @dirs ) );  | 
| 
64
 | 
3
 | 
 
 | 
 
 | 
 
 | 
 
 | 
40
 | 
   my $exec = Rex::Interface::Exec->create;  | 
| 
65
 | 
3
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
26
 | 
   if ( $^O =~ m/^MSWin/ ) {  | 
| 
66
 | 
  
0
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
0
 | 
     for (@dirs) {  | 
| 
67
 | 
  
0
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
0
 | 
       s/\//\\/g;  | 
| 
68
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
69
 | 
  
0
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
0
 | 
     $exec->exec( "rd /Q /S " . join( " ", @dirs ) );  | 
| 
70
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   }  | 
| 
71
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   else {  | 
| 
72
 | 
3
 | 
 
 | 
 
 | 
 
 | 
 
 | 
28
 | 
     @dirs = $self->_normalize_path(@dirs);  | 
| 
73
 | 
3
 | 
 
 | 
 
 | 
 
 | 
 
 | 
55
 | 
     $exec->exec( "/bin/rm -rf " . join( " ", @dirs ) );  | 
| 
74
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   }  | 
| 
75
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
76
 | 
3
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
69
 | 
   if ( $? == 0 ) { return 1; }  | 
| 
 
 | 
3
 | 
 
 | 
 
 | 
 
 | 
 
 | 
142
 | 
    | 
| 
77
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
78
 | 
  
0
  
 | 
  
  0
  
 | 
 
 | 
 
 | 
 
 | 
0
 | 
   die( "Error removing directory: " . join( ", ", @dirs ) )  | 
| 
79
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     if ( Rex::Config->get_autodie );  | 
| 
80
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
81
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
82
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub is_dir {  | 
| 
83
 | 
283
 | 
 
 | 
 
 | 
  
283
  
 | 
  
0
  
 | 
1190
 | 
   my ( $self, $path ) = @_;  | 
| 
84
 | 
283
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
7185
 | 
   ( -d $path ) ? return 1 : return undef;  | 
| 
85
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
86
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
87
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub is_file {  | 
| 
88
 | 
893
 | 
 
 | 
 
 | 
  
893
  
 | 
  
0
  
 | 
3956
 | 
   my ( $self, $file ) = @_;  | 
| 
89
 | 
893
 | 
  
100
  
 | 
  
 33
  
 | 
 
 | 
 
 | 
41818
 | 
   ( -f $file || -l $file || -b $file || -c $file || -p $file || -S $file )  | 
| 
90
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     ? return 1  | 
| 
91
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     : return undef;  | 
| 
92
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
93
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
94
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub unlink {  | 
| 
95
 | 
13
 | 
 
 | 
 
 | 
  
13
  
 | 
  
0
  
 | 
129
 | 
   my ( $self, @files ) = @_;  | 
| 
96
 | 
13
 | 
 
 | 
 
 | 
 
 | 
 
 | 
115
 | 
   for my $file (@files) {  | 
| 
97
 | 
13
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
1253
 | 
     if ( CORE::unlink($file) == 0 ) {  | 
| 
98
 | 
  
0
  
 | 
  
  0
  
 | 
 
 | 
 
 | 
 
 | 
0
 | 
       die "Error unlinking file: $file" if ( Rex::Config->get_autodie );  | 
| 
99
 | 
  
0
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
0
 | 
       return 0;  | 
| 
100
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
101
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   }  | 
| 
102
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
103
 | 
13
 | 
 
 | 
 
 | 
 
 | 
 
 | 
104
 | 
   return 1;  | 
| 
104
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
105
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
106
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub mkdir {  | 
| 
107
 | 
6
 | 
 
 | 
 
 | 
  
6
  
 | 
  
0
  
 | 
22
 | 
   my ( $self, $dir ) = @_;  | 
| 
108
 | 
6
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
689
 | 
   if ( CORE::mkdir($dir) == 0 ) {  | 
| 
109
 | 
  
0
  
 | 
  
  0
  
 | 
 
 | 
 
 | 
 
 | 
0
 | 
     die "Error creating directory: $dir" if ( Rex::Config->get_autodie );  | 
| 
110
 | 
  
0
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
0
 | 
     return 0;  | 
| 
111
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   }  | 
| 
112
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
113
 | 
6
 | 
 
 | 
 
 | 
 
 | 
 
 | 
42
 | 
   return 1;  | 
| 
114
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
115
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
116
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub stat {  | 
| 
117
 | 
141
 | 
 
 | 
 
 | 
  
141
  
 | 
  
0
  
 | 
1068
 | 
   my ( $self, $file ) = @_;  | 
| 
118
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
119
 | 
141
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
3467
 | 
   if (  | 
| 
120
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     my (  | 
| 
121
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       $dev,  $ino,   $mode,  $nlink, $uid,     $gid, $rdev,  | 
| 
122
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
       $size, $atime, $mtime, $ctime, $blksize, $blocks  | 
| 
123
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     )  | 
| 
124
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     = CORE::stat($file)  | 
| 
125
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     )  | 
| 
126
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   {  | 
| 
127
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
128
 | 
139
 | 
 
 | 
 
 | 
 
 | 
 
 | 
481
 | 
     my %ret;  | 
| 
129
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
130
 | 
139
 | 
 
 | 
 
 | 
 
 | 
 
 | 
4250
 | 
     $ret{'mode'}  = sprintf( "%04o", Rex::Helper::File::Stat->S_IMODE($mode) );  | 
| 
131
 | 
139
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1037
 | 
     $ret{'size'}  = $size;  | 
| 
132
 | 
139
 | 
 
 | 
 
 | 
 
 | 
 
 | 
609
 | 
     $ret{'uid'}   = $uid;  | 
| 
133
 | 
139
 | 
 
 | 
 
 | 
 
 | 
 
 | 
784
 | 
     $ret{'gid'}   = $gid;  | 
| 
134
 | 
139
 | 
 
 | 
 
 | 
 
 | 
 
 | 
715
 | 
     $ret{'atime'} = $atime;  | 
| 
135
 | 
139
 | 
 
 | 
 
 | 
 
 | 
 
 | 
463
 | 
     $ret{'mtime'} = $mtime;  | 
| 
136
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
137
 | 
139
 | 
 
 | 
 
 | 
 
 | 
 
 | 
2532
 | 
     return %ret;  | 
| 
138
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   }  | 
| 
139
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
140
 | 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
19
 | 
   return undef;  | 
| 
141
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
142
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
143
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub is_readable {  | 
| 
144
 | 
2
 | 
 
 | 
 
 | 
  
2
  
 | 
  
0
  
 | 
6
 | 
   my ( $self, $file ) = @_;  | 
| 
145
 | 
2
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
43
 | 
   if ( -r $file ) { return 1; }  | 
| 
 
 | 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
20
 | 
    | 
| 
146
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
147
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
148
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub is_writable {  | 
| 
149
 | 
1
 | 
 
 | 
 
 | 
  
1
  
 | 
  
0
  
 | 
8
 | 
   my ( $self, $file ) = @_;  | 
| 
150
 | 
1
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
39
 | 
   if ( -w $file ) { return 1; }  | 
| 
 
 | 
1
 | 
 
 | 
 
 | 
 
 | 
 
 | 
17
 | 
    | 
| 
151
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
152
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
153
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub readlink {  | 
| 
154
 | 
49
 | 
 
 | 
 
 | 
  
49
  
 | 
  
0
  
 | 
393
 | 
   my ( $self, $file ) = @_;  | 
| 
155
 | 
49
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1115
 | 
   return CORE::readlink($file);  | 
| 
156
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
157
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
158
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub rename {  | 
| 
159
 | 
38
 | 
 
 | 
 
 | 
  
38
  
 | 
  
0
  
 | 
430
 | 
   my ( $self, $old, $new ) = @_;  | 
| 
160
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
161
 | 
38
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1684
 | 
   my $exec = Rex::Interface::Exec->create;  | 
| 
162
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
163
 | 
38
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
1135
 | 
   if ( $^O =~ m/^MSWin/ ) {  | 
| 
164
 | 
  
0
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
0
 | 
     $old =~ s/\//\\/g;  | 
| 
165
 | 
  
0
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
0
 | 
     $new =~ s/\//\\/g;  | 
| 
166
 | 
  
0
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
0
 | 
     $exec->exec("move \"$old\" \"$new\"");  | 
| 
167
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   }  | 
| 
168
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   else {  | 
| 
169
 | 
38
 | 
 
 | 
 
 | 
 
 | 
 
 | 
749
 | 
     ($old) = $self->_normalize_path($old);  | 
| 
170
 | 
38
 | 
 
 | 
 
 | 
 
 | 
 
 | 
285
 | 
     ($new) = $self->_normalize_path($new);  | 
| 
171
 | 
38
 | 
 
 | 
 
 | 
 
 | 
 
 | 
617
 | 
     $exec->exec("/bin/mv $old $new");  | 
| 
172
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   }  | 
| 
173
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
174
 | 
38
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
676
 | 
   if ( $? == 0 ) { return 1; }  | 
| 
 
 | 
38
 | 
 
 | 
 
 | 
 
 | 
 
 | 
914
 | 
    | 
| 
175
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
176
 | 
  
0
  
 | 
  
  0
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   die "Error renaming file or directory: $old -> $new"  | 
| 
177
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     if ( Rex::Config->get_autodie );  | 
| 
178
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
179
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
180
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub glob {  | 
| 
181
 | 
  
0
  
 | 
 
 | 
 
 | 
  
0
  
 | 
  
0
  
 | 
 
 | 
   my ( $self, $glob ) = @_;  | 
| 
182
 | 
0
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
   return CORE::glob($glob);  | 
| 
183
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
184
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
185
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 1;  |