sftp_hardlink() has been introduced which when called
sends a SSH_FXP_EXTENDED request to server for creating
a hardlink.

Signed-off-by: Eshan Kelkar <eshankelkar@galorithm.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Eshan Kelkar
2023-04-04 11:52:04 +05:30
committed by Jakub Jelen
parent 804814b895
commit 88335c8e07
2 changed files with 104 additions and 0 deletions

View File

@@ -779,6 +779,22 @@ LIBSSH_API int sftp_symlink(sftp_session sftp, const char *target, const char *d
*/
LIBSSH_API char *sftp_readlink(sftp_session sftp, const char *path);
/**
* @brief Create a hard link.
*
* @param sftp The sftp session handle.
*
* @param oldpath Specifies the pathname of the file for
* which the new hardlink is to be created.
*
* @param newpath Specifies the pathname of the hardlink to be created.
*
* @return 0 on success, -1 on error with ssh and sftp error set.
*
* @see sftp_get_error()
*/
LIBSSH_API int sftp_hardlink(sftp_session sftp, const char *oldpath, const char *newpath);
/**
* @brief Get information about a mounted file system.
*