Branch Coverage

blib/lib/MDK/Common/File.pm
Criterion Covered Total %
branch 0 124 0.0


line true false branch
149 0 0 unless $_
151 0 0 open($F, '<', $_) ? :
0 0 wantarray ? :
152 0 0 open($F, '<:utf8', $_) ? :
0 0 wantarray ? :
153 0 0 unless open my $F, '<', $_[0]
0 0 wantarray ? :
154 0 0 unless open my $F, '<:utf8', $_[0]
0 0 wantarray ? :
155 0 0 wantarray ? :
156 0 0 unless open my $F, ">$f"
157 0 0 unless open my $F, '>:utf8', $f
158 0 0 unless open my $F, ">>$f"
169 0 0 unless sysopen my $F, $f, POSIX::O_CREAT() | POSIX::O_EXCL() | POSIX::O_RDWR()
176 0 0 if (-d $dir) { }
0 0 elsif (-e $dir) { }
182 0 0 unless mkdir $dir, 493
189 0 0 if (not -l $_ and -d $_) { }
191 0 0 unless rmdir $_
193 0 0 unless unlink $_
205 0 0 unless @_
206 0 0 unless @_ == 1 or -d $dest
210 0 0 if -d $dest
214 0 0 if (-l $src and $keep_special) { }
0 0 elsif (-d $src) { }
0 0 elsif (-b $src || -c $src || -S $src || -p $src and $keep_special) { }
215 0 0 unless (symlink readlink $src || die("readlink failed: $!"), $dest)
219 0 0 unless -d $dest or mkdir $dest, (stat $src)[2]
224 0 0 unless MDK::Common::System::syscall_('mknod', $dest, $stat[2], $stat[6])
226 0 0 unless open my $F, $src
227 0 0 unless open my $G, "> $dest"
242 0 0 unless @_
243 0 0 unless @_ == 1 or -d $dest
247 0 0 if ($rootdev == -1)
253 0 0 if -d $dest
257 0 0 if (-l $src and $keep_special) { }
0 0 elsif (-d $src) { }
0 0 elsif (-b $src || -c $src || -S $src || -p $src and $keep_special) { }
258 0 0 unless (symlink readlink $src || die("readlink failed: $!"), $dest)
262 0 0 unless -d $dest or mkdir $dest, (stat $src)[2]
267 0 0 unless MDK::Common::System::syscall_('mknod', $dest, $stat[2], $stat[6])
270 0 0 if ($stat[0] != $rootdev)
273 0 0 unless open my $F, $src
274 0 0 unless open my $G, "> $dest"
288 0 0 unless (-e $f)
301 0 0 unless opendir F, $d
302 0 0 if $_ ne '.'
311 0 0 -d $_ ? :
315 0 0 $_[0] =~ /\*/ ? :
317 0 0 if $d =~ /\*/
320 0 0 unless $d =~ m[/$]
321 0 0 $d eq './' ? :
328 0 0 if (-l $file)
332 0 0 if (-s $file) { }
337 0 0 if eof and not /\n/
347 0 0 unless open my $F, "+> $file"
360 0 0 if $l =~ m[^\.\./(/.*)]
364 0 0 unless $f =~ s[/[^/]+$][]
370 0 0 unless $first eq ''
382 0 0 unless -e $f or -e "$f.gz"
383 0 0 -e $f ? :
0 0 unless open my $F, -e $f ? $f : "gzip -dc '$f.gz'|"