line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::FSP::File; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
20
|
|
5
|
1
|
|
|
1
|
|
319
|
use Net::FSP::Entry; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
6
|
1
|
|
|
1
|
|
6
|
use base 'Net::FSP::Entry'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
303
|
|
7
|
|
|
|
|
|
|
our $VERSION = $Net::FSP::VERSION; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub download { |
10
|
0
|
|
|
0
|
1
|
|
my ($self, $sink) = @_; |
11
|
0
|
0
|
|
|
|
|
$sink = $self->{name} if not defined $sink; |
12
|
0
|
|
|
|
|
|
$self->{fsp}->download_file($self->{name}, $sink); |
13
|
0
|
|
|
|
|
|
return; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub grab { |
17
|
0
|
|
|
0
|
1
|
|
my ($self, $sink) = @_; |
18
|
0
|
0
|
|
|
|
|
$sink = $self->{name} if not defined $sink; |
19
|
0
|
|
|
|
|
|
$self->{fsp}->grab_file($self->{name}, $sink); |
20
|
0
|
|
|
|
|
|
return; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub upload { |
24
|
0
|
|
|
0
|
1
|
|
my ($self, $source) = @_; |
25
|
0
|
|
|
|
|
|
$self->{fsp}->grab_file($self->{name}, $source); |
26
|
0
|
|
|
|
|
|
return; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub remove { |
30
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
31
|
0
|
|
|
|
|
|
$self->{fsp}->delete_file($self->{name}); |
32
|
0
|
|
|
|
|
|
return; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub accept { |
36
|
0
|
|
|
0
|
1
|
|
my ($self, $visitor) = @_; |
37
|
0
|
|
|
|
|
|
$visitor->($self); |
38
|
0
|
|
|
|
|
|
return; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub open { |
42
|
0
|
|
|
0
|
1
|
|
my ($self, $mode) = @_; |
43
|
0
|
|
0
|
|
|
|
$mode ||= '<'; |
44
|
0
|
|
|
|
|
|
return $self->{fsp}->open_file($self->name, $mode); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |