diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-08-12 17:12:26 +0200 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-08-12 17:13:42 +0200 |
commit | 2dc3b5c67527b9403befb2d54c43a3fab23be4e2 (patch) | |
tree | 3ed03126c1f312ca47c2950a8d054a0a3dd83d08 /include/libssh/sftp.h | |
parent | 63011c29a0922a7fd57a14bb2b45695e716a9b00 (diff) | |
download | libssh-2dc3b5c67527b9403befb2d54c43a3fab23be4e2.tar.gz libssh-2dc3b5c67527b9403befb2d54c43a3fab23be4e2.tar.xz libssh-2dc3b5c67527b9403befb2d54c43a3fab23be4e2.zip |
Add sftp_extension_supported() function.
Diffstat (limited to 'include/libssh/sftp.h')
-rw-r--r-- | include/libssh/sftp.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/libssh/sftp.h b/include/libssh/sftp.h index 347661d..9d3647b 100644 --- a/include/libssh/sftp.h +++ b/include/libssh/sftp.h @@ -262,6 +262,26 @@ LIBSSH_API const char *sftp_extensions_get_name(SFTP_SESSION *sftp, unsigned int LIBSSH_API const char *sftp_extensions_get_data(SFTP_SESSION *sftp, unsigned int index); /** + * @brief Check if the given extension is supported. + * + * @param sftp The sftp session to use. + * + * @param name The name of the extension. + * + * @param data The data of the extension. + * + * @return 1 if supported, 0 if not. + * + * Example: + * + * @code + * sftp_extension_supported(sftp, "statvfs@openssh.com", "2"); + * @endcode + */ +LIBSSH_API int sftp_extension_supported(SFTP_SESSION *sftp, const char *name, + const char *data); + +/** * @brief Open a directory used to obtain directory entries. * * @param session The sftp session handle to open the directory. |