| 1 | # | ||||||||||
| 2 | # (c) Jan Gehring <jan.gehring@gmail.com> | ||||||||||
| 3 | # | ||||||||||
| 4 | |||||||||||
| 5 | package Rex::Helper::File::Stat::Win32; | ||||||||||
| 6 | |||||||||||
| 7 | 52 | ▶ | use v5.14.4; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 52 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 52 | our $VERSION = '1.16.1'; # VERSION | |||||||||
| 11 | |||||||||||
| 12 | 52 | ▶ | use Fcntl; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | |||||||||||
| 14 | 52 | ▶ | use Rex::Interface::Exec; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 15 | |||||||||||
| 16 | 0 | ▶ | sub S_ISDIR { | ||||||||
|
Subroutine
S_ISDIR: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 17 | 0 | shift; | |||||||||
| 18 | 0 | Fcntl::S_ISDIR(@_); | |||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | 0 | ▶ | sub S_ISREG { | ||||||||
|
Subroutine
S_ISREG: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 22 | 0 | shift; | |||||||||
| 23 | 0 | Fcntl::S_ISREG(@_); | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | 0 | ▶ | sub S_ISLNK { | ||||||||
|
Subroutine
S_ISLNK: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 27 | 0 | shift; | |||||||||
| 28 | 0 | ▶ | if ( Rex::is_ssh() ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 29 | 0 | my $exec = Rex::Interface::Exec->create; | |||||||||
| 30 | 0 | $exec->exec("perl -le 'use Fcntl; exit Fcntl::S_ISLNK($_[0])'"); | |||||||||
| 31 | 0 | return $?; | |||||||||
| 32 | } | ||||||||||
| 33 | else { | ||||||||||
| 34 | 0 | Rex::Logger::info( "S_ISLNK not supported on your platform.", "warn" ); | |||||||||
| 35 | 0 | return 0; | |||||||||
| 36 | } | ||||||||||
| 37 | } | ||||||||||
| 38 | |||||||||||
| 39 | 0 | ▶ | sub S_ISBLK { | ||||||||
|
Subroutine
S_ISBLK: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 40 | 0 | shift; | |||||||||
| 41 | 0 | Fcntl::S_ISBLK(@_); | |||||||||
| 42 | } | ||||||||||
| 43 | |||||||||||
| 44 | 0 | ▶ | sub S_ISCHR { | ||||||||
|
Subroutine
S_ISCHR: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 45 | 0 | shift; | |||||||||
| 46 | 0 | Fcntl::S_ISCHR(@_); | |||||||||
| 47 | } | ||||||||||
| 48 | |||||||||||
| 49 | 0 | ▶ | sub S_ISFIFO { | ||||||||
|
Subroutine
S_ISFIFO: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 50 | 0 | shift; | |||||||||
| 51 | 0 | Fcntl::S_ISFIFO(@_); | |||||||||
| 52 | } | ||||||||||
| 53 | |||||||||||
| 54 | 0 | ▶ | sub S_ISSOCK { | ||||||||
|
Subroutine
S_ISSOCK: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 55 | 0 | shift; | |||||||||
| 56 | |||||||||||
| 57 | 0 | ▶ | if ( Rex::is_ssh() ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 58 | 0 | my $exec = Rex::Interface::Exec->create; | |||||||||
| 59 | 0 | $exec->exec("perl -le 'use Fcntl; exit Fcntl::S_ISSOCK($_[0])'"); | |||||||||
| 60 | 0 | return $?; | |||||||||
| 61 | } | ||||||||||
| 62 | else { | ||||||||||
| 63 | 0 | Rex::Logger::info( "S_ISSOCK not supported on your platform.", "warn" ); | |||||||||
| 64 | 0 | return 0; | |||||||||
| 65 | } | ||||||||||
| 66 | } | ||||||||||
| 67 | |||||||||||
| 68 | 0 | ▶ | sub S_IMODE { | ||||||||
|
Subroutine
S_IMODE: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 69 | 0 | shift; | |||||||||
| 70 | 0 | Fcntl::S_IMODE(@_); | |||||||||
| 71 | } | ||||||||||
| 72 | |||||||||||
| 73 | 52 | 1; | |||||||||