8bool ExtAttribGet(
char *FileName,
char *AttrName,
byte *Data,
int MaxDataLen,
int *DataLen)
12 char FullAttrName[128];
16 if(!FileName || !*FileName || !AttrName || !*AttrName)
18 if(DataLen) *DataLen = 0;
27 f = open(AbsFileName, O_RDWR, 0600);
31 TAP_SPrint(FullAttrName,
"user.%s", AttrName);
32 if((i = fgetxattr(f, FullAttrName, NULL, 0)) >= 0)
35 if(i > MaxDataLen) i = MaxDataLen;
36 fgetxattr(f, FullAttrName, Data, i);
37 if(DataLen) *DataLen = i;
47 if(DataLen) *DataLen = 0;
void ConvertPathType(const char *Source, char *Dest, tPathFormat DestFormat)
bool ExtAttribGet(char *FileName, char *AttrName, byte *Data, int MaxDataLen, int *DataLen)