libsmbclient and browsing: dirents and entry type ...
Michael Sweet
mike at easysw.com
Mon Jan 1 14:55:02 GMT 2001
Richard Sharpe wrote:
> ...
> The normal paradigm that I expect to be used is:
>
> dirp = smbc_opendir("smb://");
>
> while (dir = readdir(dirp)) {
> ...
I strongly recommend *against* shoe-horning the SAMBA browsing stuff
into the "standard" directory functions - no two UNIX's use the
same dirent structure (in fact, some use a structure named "direct")
If instead you provide your own smbc_dirent structure, it can
contain the smbc_stat values.
...
> from among:
>
> SMBC_ALL_WORKGROUPS or SMBC_TOP
> SMBC_WORKGROUP
> SMBC_SERVER
> SMBC_SHARE
> SMBC_DIR
> SMBC_FILE
> SMBC_LINK???
I think you'll want to identify the type of share - directory or
printer or whatever. Other than that, it looks like enough
information to implement all sorts of applications.
--
______________________________________________________________________
Michael Sweet, Easy Software Products mike at easysw.com
Printing Software for UNIX http://www.easysw.com
More information about the samba-technical
mailing list