Subject: | Request: CHMOD support in Net::FTP |
Many FTP servers support CHMOD although it's not in RFC 959. The code
snippets below implement CHMOD support. I've been using this in my own
Net::FTP subclass for about a year.
sub chmod
{
@_ == 3 or croak('usage: $ftp->chmod( MODE, FILE )');
my($ftp,$mode,$remote) = @_;
$ftp->_CHMOD($mode,$remote);
}
sub _CHMOD { shift->command("SITE CHMOD", @_)->response() == CMD_OK }
-- Chris