libsmbclient.h API to get all attributes of all files in folder

Puran Chand puran157 at
Tue Feb 14 11:07:38 UTC 2017

Hi Folks,

I was exploring *libsmbclient.h* for a 'ls' kind of functionality which
returns all file/folder list in a samba server folder with all attributes.
(ex name, size, create_time, modified_time, accessed_time, type of file etc)

The structure in libsmbclient.h (*struct* *smbc_dirent*) doesn't serve the
purpose as it has the name of file/folder and no details about the nested
files and all attributes.

I used the *smbc_getFunctionGetxattr(_context)(_context, samba_url,
"system.dos.attr*", in_buff, size)* but it returns the attributes of single
folder and I had to call it again and again for all nested file which has
performance issues because of authentication overhead.

I used *smbc_opendir()* API and I can see all the details received by
client in wireshark packet capture but it returns *SMBCFILE **  which also
has smbc_dirent and no other attributes.

Is there any API which solves this for me or am I doing something wrong

If No, can I work on writing a public API in *libsmbclient.h* which will
serve the above mentioned purpose?


*RegardsPuran Chand*

More information about the samba-technical mailing list