Filesys-SmbClientParser

 view release on metacpan or  search on metacpan

SmbClientParser.pm  view on Meta::CPAN

              $rec->{name} = $1;
              $rec->{master} = $2;
              push @ret, $rec;
              }
          }
      }
    return sort byname @ret;
  }

#------------------------------------------------------------------------------
# sendWinpopupMessage
#------------------------------------------------------------------------------
sub sendWinpopupMessage
  {
    my ($self, $dest, $text) = @_;
    my $args = "/bin/echo \"$text\" | ".$self->{SMBLIENT}." -M $dest";
    return $self->command($args,"winpopup message");
  }

#------------------------------------------------------------------------------
# cd
#------------------------------------------------------------------------------
sub cd
  {
    my $self = shift;
    my $dir  = shift;
    if ($dir)

SmbClientParser.pm  view on Meta::CPAN

  my @l = $smb->GetShr;
  foreach (@l) {print $_->{name},"\n";}
  
  # Choose a shared disk
  $smb->Share('games2');
  
  # List content
  my @l = $smb->dir;
  foreach (@l) {print $_->{name},"\n";}
  
  # Send a Winpopup message
  $smb->sendWinpopupMessage('jupiter',"Hello world !");
  
  # File manipulation
  $smb->cd('jdk1.1.8');
  $smb->get("COPYRIGHT");
  $smb->mkdir('tata');
  $smb->cd('tata');
  $smb->put("COPYRIGHT");
  $smb->del("COPYRIGHT");
  $smb->cd('..');
  $smb->rmdir('tata');

SmbClientParser.pm  view on Meta::CPAN

If no parameters is given, field will be used.

Return an array with sorted share listing, that contains hashes;
keys: name, type, comment

=item GetHosts [HOSTNAME, USER, PASSWORD, WORKGROUP, IP]

Return an array with sorted host listing, that contains hashes; 
keys: name, comment

=item sendWinpopupMessage DEST, TEXT

This method allows you to send messages, using the "WinPopup" protocol,
to another computer. If the receiving computer is running WinPopup the
user will receive the message and probably a beep. If they are not
running WinPopup the message will be lost, and no error message will occur.

The message is also automatically truncated if the message is over
1600 bytes, as this is the limit of the protocol.

Parameters :



( run in 2.090 seconds using v1.01-cache-2.11-cpan-364913b4093 )