[Samba] How do i get file attributes using samba.

naga_kishore_kommuri at yahoo.com naga_kishore_kommuri at yahoo.com
Mon Jun 20 01:58:07 MDT 2011


Hi,
I need to extract the following attributes of a file in Windows share using samba.

/* FileAttributesField */
#define FILE_ATTRIBUTE_READONLY         0x001L
#define FILE_ATTRIBUTE_HIDDEN           0x002L
#define FILE_ATTRIBUTE_SYSTEM           0x004L
#define FILE_ATTRIBUTE_DIRECTORY        0x010L
#define FILE_ATTRIBUTE_ARCHIVE          0x020L
#define FILE_ATTRIBUTE_NORMAL           0x080L
#define FILE_ATTRIBUTE_TEMPORARY        0x100L
#define FILE_ATTRIBUTE_SPARSE           0x200L
#define FILE_ATTRIBUTE_REPARSE_POINT    0x400L
#define FILE_ATTRIBUTE_COMPRESSED       0x800L
#define FILE_ATTRIBUTE_OFFLINE          0x1000L
#define FILE_ATTRIBUTE_NONINDEXED       0x2000L
#define FILE_ATTRIBUTE_ENCRYPTED        0x4000L
#define SAMBA_ATTRIBUTES_MASK           0x7F


Which API of samba library should I use to extract these attributes of a file.

Thanks 

-Kishore


More information about the samba mailing list