1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
|
const char *cPath = [path cStringWithEncoding: encoding];
const char *cName = [name cStringWithEncoding: encoding];
# if defined(OF_LINUX)
ssize_t size = lgetxattr(cPath, cName, NULL, 0);
# elif defined(OF_MACOS)
ssize_t size = getxattr(cPath, cName, NULL, 0, 0, XATTR_NOFOLLOW);
# endif
void *value = OFAllocMemory(1, size);
OFData *data;
@try {
# if defined(OF_LINUX)
if ((size = lgetxattr(cPath, cName, value, size)) < 0)
# elif defined(OF_MACOS)
if ((size = getxattr(cPath, cName, value, size, 0,
XATTR_NOFOLLOW)) < 0)
# endif
|
|
>
>
>
>
>
>
|
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
|
const char *cPath = [path cStringWithEncoding: encoding];
const char *cName = [name cStringWithEncoding: encoding];
# if defined(OF_LINUX)
ssize_t size = lgetxattr(cPath, cName, NULL, 0);
# elif defined(OF_MACOS)
ssize_t size = getxattr(cPath, cName, NULL, 0, 0, XATTR_NOFOLLOW);
# endif
void *value;
OFData *data;
if (size < 0)
@throw [OFGetItemAttributesFailedException
exceptionWithIRI: IRI
errNo: errno];
value = OFAllocMemory(1, size);
@try {
# if defined(OF_LINUX)
if ((size = lgetxattr(cPath, cName, value, size)) < 0)
# elif defined(OF_MACOS)
if ((size = getxattr(cPath, cName, value, size, 0,
XATTR_NOFOLLOW)) < 0)
# endif
|