sftp_rename method

int sftp_rename(
  1. sftp_session sftp,
  2. Pointer<Int8> original,
  3. Pointer<Int8> newname
)

@brief Rename or move a file or directory.

@param sftp The sftp session handle.

@param original The original url (source url) of file or directory to be moved.

@param newname The new url (destination url) of the file or directory after the move.

@return 0 on success, < 0 on error with ssh and sftp error set.

@see sftp_get_error()

Implementation

int sftp_rename(
  sftp_session sftp,
  ffi.Pointer<ffi.Int8> original,
  ffi.Pointer<ffi.Int8> newname,
) {
  return _sftp_rename(
    sftp,
    original,
    newname,
  );
}