ftp share_info, share_modify
sub share_info($$)
{
my $invocant = shift;
my $share = shift;
unless( defined $share) {
ftp_error->set_error( $ftp_error::error_parameter );
return undef;
}
my $cfg = Config::IniFiles->new();
unless( $cfg) {
ftp_error->set_error( $ftp_error::error_file_IO);
return undef;
}
$cfg->SetFileName($file_share_config);
$cfg->ReadConfig();
return $error_share_not_exist unless( $cfg->SectionExists($share));
my $pathname = $cfg->val( $share, $tag_pathname);
my $guest = $cfg->val( $share, $tag_guest);
my $readonly = $cfg->val( $share, $tag_readonly);
my $hide = $cfg->val( $share, $tag_hide);
return ($share, $pathname, $guest, $readonly, $hide);
}
…..
sub share_modify($$$$$$)
{
my $invocant = shift;
my( $share, $pathname, $guest, $readonly, $hide) = @_;
unless( defined $share && defined $pathname
&& defined $guest && defined $readonly && defined $hide) {
ftp_error->set_error( $ftp_error::error_parameter );
return undef;
}
……