libsmbclient.h API to get all attributes of all files in folder
puran157 at gmail.com
Wed Feb 15 04:45:33 UTC 2017
This worked but performance wise its poor.
For large number of files in directory, this is taking huge time.
It seems for every smbc_stat() call, its opening a fresh connection and
closing it after fetching attributes. The authentication is an overhead for
On Tue, Feb 14, 2017 at 6:00 PM, Andreas Schneider <asn at samba.org> wrote:
> On Tuesday, 14 February 2017 16:37:38 CET Puran Chand wrote:
> > 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
> > (ex name, size, create_time, modified_time, accessed_time, type of file
> > The structure in libsmbclient.h (*struct* *smbc_dirent*) doesn't serve
> > 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
> > 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
> > has smbc_dirent and no other attributes.
> > Is there any API which solves this for me or am I doing something wrong
> > here.
> > If No, can I work on writing a public API in *libsmbclient.h* which will
> > serve the above mentioned purpose?
> libsmbclient provides a POSIX like API.
> while dp = readdir(dir) != NULL
> Andreas Schneider GPG-ID: CC014E3D
> Samba Team asn at samba.org
*Member of Technical Staff,*
More information about the samba-technical