[Libssh] sftp - determining directory item types
Aris Adamantiadis
aris at 0xbadc0de.be
Thu May 15 18:26:35 CEST 2008
Hello,
Re-reading the drafts, it looks like the type of file is included into
the permission field :
The `permissions' field contains a bit mask of file permissions as
defined by posix [1].
also, the diffs from v3 to v4 says
o Split the file type out of the permissions field and into it's own
field (which is always present.)
So, you have to find that information into the bitmask permissions.
Regards,
Aris
Mike Taylor a écrit :
> Hi Aris,
>
> I don't see a function to get the sftp version, however the
> SFTP_SESSION structure's server_version member is set to 3. Also,
> I've traced the code though the sftp_parse_attr_3 function.
>
> Cheers!
>
> /\/\ike
>
> On 15-May-08, at 9:49 AM, Aris Adamantiadis wrote:
>> Hello,
>>
>> I wouldn't trust the first character. The SFTP_ATTRIBUTE structure is
>> badly designed because the sftp draft completely changed it at every
>> version. So, to answer correctly your question i'd need the version of
>> the sftp protocol your server is speaking. (I think there is a libssh
>> function to tell that).
>>
>> Regards,
>> Aris
>
>
>
>
> _______________________________________________
> Libssh mailing list
> Libssh at cerkinfo.be
> http://www.cerkinfo.be/cgi-bin/mailman/listinfo/libssh
More information about the Libssh
mailing list