| 1 | package Net::FSP::Dir; | ||||||||||
| 2 | |||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 2 | ▶ | use base 'Net::FSP::Entry'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 2 | our $VERSION = $Net::FSP::VERSION; | |||||||||
| 7 | |||||||||||
| 8 | 0 | ▶ | sub list { | ||||||||
|
Subroutine
list: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 9 | 0 | my $self = shift; | |||||||||
| 10 | |||||||||||
| 11 | 0 | my $dir = $self->name; | |||||||||
| 12 | 0 | return $self->{fsp}->list_dir($self->name . '/'); | |||||||||
| 13 | } | ||||||||||
| 14 | |||||||||||
| 15 | 0 | ▶ | sub download { | ||||||||
|
Subroutine
download: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||
| 16 | 0 | my ($self, $local_dir) = @_; | |||||||||
| 17 | 0 | ▶ | $local_dir = $self->name if not defined $local_dir; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 18 | |||||||||||
| 19 | 0 | ▶ | mkdir $local_dir if not -d $local_dir; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | 0 | for my $entry ($self->list) { | |||||||||
| 21 | 0 | $entry->download("$local_dir/$entry"); | |||||||||
| 22 | } | ||||||||||
| 23 | 0 | return; | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | 0 | ▶ | sub accept { | ||||||||
|
Subroutine
accept: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 27 | 0 | my ($self, $visitor) = @_; | |||||||||
| 28 | 0 | $visitor->($self); | |||||||||
| 29 | 0 | for my $entry ($self->list) { | |||||||||
| 30 | 0 | $entry->accept($visitor); | |||||||||
| 31 | } | ||||||||||
| 32 | 0 | return; | |||||||||
| 33 | } | ||||||||||
| 34 | |||||||||||
| 35 | 0 | ▶ | sub change_current { | ||||||||
|
Subroutine
change_current: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 36 | 0 | my $self = shift; | |||||||||
| 37 | 0 | $self->{fsp}->change_dir($self->{name}); | |||||||||
| 38 | 0 | return; | |||||||||
| 39 | } | ||||||||||
| 40 | |||||||||||
| 41 | 0 | ▶ | sub remove { | ||||||||
|
Subroutine
remove: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 42 | 0 | my $self = shift; | |||||||||
| 43 | 0 | $self->{fsp}->remove_dir($self->{name}); | |||||||||
| 44 | 0 | return; | |||||||||
| 45 | } | ||||||||||
| 46 | |||||||||||
| 47 | 0 | ▶ | sub readme { | ||||||||
|
Subroutine
readme: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 48 | 0 | my $self = shift; | |||||||||
| 49 | 0 | return $self->{fsp}->get_readme($self->{name}); | |||||||||
| 50 | } | ||||||||||
| 51 | |||||||||||
| 52 | 0 | ▶ | sub get_protection { | ||||||||
|
Subroutine
get_protection: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 53 | 0 | my $self = shift; | |||||||||
| 54 | 0 | return $self->{fsp}->get_protection($self->{name}); | |||||||||
| 55 | } | ||||||||||
| 56 | |||||||||||
| 57 | 0 | ▶ | sub set_protection { | ||||||||
|
Subroutine
set_protection: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 58 | 0 | my ($self, $mod) = @_; | |||||||||
| 59 | 0 | return $self->{fsp}->get_protection($self->{name}); | |||||||||
| 60 | } | ||||||||||
| 61 | |||||||||||
| 62 | 2 | 1; | |||||||||
| 63 | |||||||||||
| 64 | __END__ | ||||||||||