[Libssh] sftp - determining directory item types
Mike Taylor
mike at codeshorts.ca
Thu May 15 15:28:56 CEST 2008
Seems like I can probably use the first character of the long name to
determine the type of the entry. How safe is that?
/\/\ike
On 15-May-08, at 7:43 AM, Mike Taylor wrote:
>
> Hello all,
>
> I've recently picked up libssh and everything is going very well.
>
> I did hit a problem however. I'm reading the elements of a
> directory via sftp and I noticed that the "type" field is not set in
> the SFTP_ATTRIBUTES structure. That means I cannot tell which
> directory entries are files and which are directories. Knowing that
> is pretty fundamental to what I'm doing.
>
> Any suggestions would be greatly appreciated! I'm willing to help
> out and submit a patch if need be.
>
> /\/\ike
>
More information about the Libssh
mailing list