Net-SFTP-Foreign

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

          Wilson)

1.73  May 11, 2012
        - password authentication was broken on Solaris (maybe also on
          others) due to an incorrect waitpid call (bug report and
          solution by Douglas Wilson)
        - disconnect was dieing when used with autodie on (bug report
          by Douglas Wilson)

1.72_02  May 4, 2012
        - add methods truncate, chmod, chown and utime
        - make setstat, stat and statvfs accept both a path and a
          remote file/dir handle as its first argument
        - deprecate fsetstat, fstat and fstatvfs
        - refactor remove and rmdir generation
        - add support for sparse file transfer
        - minor doc improvements

1.72_01  Mar 20, 2012
        - add support for asks_for_username_at_login feature (feature
          request by Horea Gligan)

lib/Net/SFTP/Foreign.pm  view on Meta::CPAN

                                        map { $arg_types[$_] => $_[$_] } 0..$#arg_types );
        $sftp->_check_status_ok($id,
                                SFTP_ERR_REMOTE_SETSTAT_FAILED,
                                "Couldn't setstat remote file ($name)");
    };
    no strict 'refs';
    *$name = $sub;
}

_gen_setstat_shortcut(truncate => 'file', SSH2_FILEXFER_ATTR_SIZE,        'int64');
_gen_setstat_shortcut(chown    => 'any' , SSH2_FILEXFER_ATTR_UIDGID,      'int32', 'int32');
_gen_setstat_shortcut(chmod    => 'any' , SSH2_FILEXFER_ATTR_PERMISSIONS, 'int32');
_gen_setstat_shortcut(utime    => 'any' , SSH2_FILEXFER_ATTR_ACMODTIME,   'int32', 'int32');

sub _close {
    @_ == 2 or croak 'Usage: $sftp->close($fh, $attrs)';

    my $sftp = shift;
    my $id = $sftp->_queue_rid_request(SSH2_FXP_CLOSE, @_);
    defined $id or return undef;

lib/Net/SFTP/Foreign.pm  view on Meta::CPAN

remote file handles.

Returns true on success and undef on failure.

=item $sftp-E<gt>fsetstat($handle, $attrs)

this method is deprecated.

=item $sftp-E<gt>truncate($path_or_fh, $size)

=item $sftp-E<gt>chown($path_or_fh, $uid, $gid)

=item $sftp-E<gt>chmod($path_or_fh, $perm)

=item $sftp-E<gt>utime($path_or_fh, $atime, $mtime)

Shortcuts around C<setstat> method.

=item $sftp-E<gt>remove($path)

Sends a C<SSH_FXP_REMOVE> command to remove the remote file



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