Subject: Re: Check if LIBSSH2_SFTP_ATTRIBUTES points to a directory.

Re: Check if LIBSSH2_SFTP_ATTRIBUTES points to a directory.

From: Alexander Lamaison <swish_at_lammy.co.uk>
Date: Mon, 24 Sep 2012 14:17:17 +0100

On 24 September 2012 13:46, niXman <i.nixman_at_gmail.com> wrote:
>
> I use libssh2_sftp_readdir_ex() to read directory entries.
> Tell me plase, how I can check thah LIBSSH2_SFTP_ATTRIBUTES points to
> a directory?

That struct is modelled on a standard Unix 'stat' buffer. See some
code here [1] that extracts the file type from it using the #defines
in libssh2.

[1] https://github.com/alamaison/swish/blob/master/ssh/sftp.hpp#L464

Alex

-- 
Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-09-24