Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

WebFS::FileCopy::Put
Object for putting data to either file or ftp URI

WebFS::FileCopy::Put - Object for putting data to either file or ftp URI



NAME

WebFS::FileCopy::Put - Object for putting data to either file or ftp URI


SYNOPSIS


 use WebFS::FileCopy::Put;

 my $req = HTTP::Request->new(PUT => 'file:/tmp/zzz');

 my $put = WebFS::FileCopy::Put->new($req);

 if ($put) {

   $put->print "Content goes here\n";

   my $res = $put->close;

   print $res->as_string, "\n";

 } else {

   my $res = $@;

   print $res->message, "\n";

 }


DESCRIPTION

An WebFS::FileCopy::Put object is used to put data to a remote file on an FTP server or a local file. The location is specified by using a LWP::Request object.


METHODS

The following methods are available:

new request
Returns either an WebFS::FileCopy::Put::FTP or WebFS::FileCopy::PUT::File object if a file or FTP put request is passed. If invalid arguments are passed to new or if the put cannot be created, then undef is returned and $@ will contain a valid HTTP::Response.

print buffer
Put the contents of buffer to the PUT file.

close
Close the PUT file and return a LWP::Response, which can be used to test for the success or failure of the close using the is_success method.


SEE ALSO

See also the the WebFS::FileCopy manpage and the LWP::Simple manpage manual pages.


AUTHOR

Blair Zajac <blair@akamai.com>


COPYRIGHT

Copyright (C) 1998-2001 by Blair Zajac. All rights reserved. This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy