mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
Add support for hardlink@openssh.com
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:
committed by
Jakub Jelen
parent
804814b895
commit
88335c8e07
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user