sftp; Emits a warning if the operation fails.

O

okey

Changing to net::sftp from ftp. What does this mean (in discussing
how a particular method fails)

Emits a warning if the operation fails.

Are they talking about the return status?, or is there something else
that must be captured or monitored?

Thank you

Example text: =============

$sftp->do_remove($path)

Sends a SSH_FXP_REMOVE command to remove the remote file $path.

Emits a warning if the operation fails.

Returns the status code for the operation. To turn the status code
into a text message, take a look at the fx2txt function in
Net::SFTP::Util.
 
J

Jim Gibson

okey said:
Changing to net::sftp from ftp. What does this mean (in discussing
how a particular method fails)

Emits a warning if the operation fails.

Are they talking about the return status?, or is there something else
that must be captured or monitored?

Thank you

Example text: =============

$sftp->do_remove($path)

Sends a SSH_FXP_REMOVE command to remove the remote file $path.

Emits a warning if the operation fails.

Returns the status code for the operation. To turn the status code
into a text message, take a look at the fx2txt function in
Net::SFTP::Util.

A quick glance at the source code for the Net::SFT module reveals that
it uses the croak routine of the Carp module for "emitting" error
messages. While the do_remove function is not part of the Net::SFTP
package itself, the do_read module is and uses croak, so do_remove is
probably similar. The croak routine prints a message to standard error
output, like die, but gives the line of the calling program (your
program) instead of the module.

You can view the source code for Net::SFTP by executing 'perldoc -m
Net::SFTP' or browsing to

<http://cpansearch.perl.org/src/DBROBINS/Net-SFTP-0.10/lib/Net/SFTP.pm>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top