Filesys-SmbClient

 view release on metacpan or  search on metacpan

SmbClient.pm  view on Meta::CPAN

    or print "Can't create file:", $!, "\n";
  $smb->write($fd, "A test of write call") 
    or print $!,"\n";
  $smb->close($fd);

FILEHANDLE must be open with open of this module.

=item seek FILEHANDLE, POS

Sets FILEHANDLE's position, just like the "fseek"
call of "stdio".  FILEHANDLE may be an expression
whose value gives the name of the filehandle.  The
values for WHENCE is always SEEK_SET beacause others
didn't work on libsmbclient.so

FILEHANDLE must be open with open of this module.

=item close FILEHANDLE

Close file FILEHANDLE. Return 0 on success, else -1 is return and
errno and $! is set.

=back

=item shutdown flag

A wrapper around `libsmbclient's `smbc_free_context'.

Close open files, release Samba connection, delete context,
aquired during open_* calls.

Example:

    $smb->shutdown(0); # Gracefully close connection
    $sbm->shutdown(1); # Forcibly close files and connection

NOTE:
    shutdown(1) may cause complaints about talloc memory
    leaks, if there are currently no open files.

=head2 Print method

=over

=item unlink_print_job PRINTER_URL, IDJOB

Remove job number IDJOB on printer PRINTER_URL

=item print_file DOCUMENT_URL, PRINTER_URL

Print file DOCUMENT_URL on PRINTER_URL

=back

=head1 TODO

=over 

=item *

chown

=item *

chmod

=item *

open_print_job

=item *

telldir

=item *

lseekdir

=back

=head1 EXAMPLE

This module come with some scripts:

=over

=item t/*.t

Just for check that this module is ok :-)

=item smb2www-2.cgi

A CGI interface with these features:

=over

=item *

browse workgroup ,share, dir

=item *

read file

=item *

upload file

=item *

create directory

=item *

unlink file, directory

=back

=back

=head1 COPYRIGHT



( run in 0.599 second using v1.01-cache-2.11-cpan-71847e10f99 )