Tizen Native API
Functions
Tools
Eina

Functions

Eina_Iteratoreina_xattr_ls (const char *file)
 Gets an iterator that lists all the extended attributes of a file.
Eina_Iteratoreina_xattr_value_ls (const char *file)
 Gets an iterator that lists all the extended attribute values related to a file.
Eina_Iteratoreina_xattr_fd_ls (int fd)
 Gets an iterator that lists all extended attribute related to a file.
Eina_Iteratoreina_xattr_value_fd_ls (int fd)
 Gets an iterator that lists all extended attribute value related to a file.
void * eina_xattr_get (const char *file, const char *attribute, ssize_t *size)
 Gets an extended attribute from a file.
Eina_Bool eina_xattr_set (const char *file, const char *attribute, const void *data, ssize_t length, Eina_Xattr_Flags flags)
 Sets an extended attribute to a file.
Eina_Bool eina_xattr_string_set (const char *file, const char *attribute, const char *data, Eina_Xattr_Flags flags)
 Sets a string as an extended attribute property.
char * eina_xattr_string_get (const char *file, const char *attribute)
 Gets a string from an extended attribute property.
Eina_Bool eina_xattr_double_set (const char *file, const char *attribute, double value, Eina_Xattr_Flags flags)
 Sets a double as an extended attribute property.
Eina_Bool eina_xattr_double_get (const char *file, const char *attribute, double *value)
 Gets a double from an extended attribute property.
Eina_Bool eina_xattr_int_set (const char *file, const char *attribute, int value, Eina_Xattr_Flags flags)
 Sets an integer as a extended attribute property.
Eina_Bool eina_xattr_int_get (const char *file, const char *attribute, int *value)
 Gets a integer from an extended attribute property.

Eina tools aims to help application development, providing ways to make it safer, log errors, manage memory more efficiently and more.


Enumeration Type Documentation

Enumeration of extended attribute creation.

Since (EFL) :
1.1
Enumerator:
EINA_XATTR_INSERT 

This is the default behaviour, it either creates or replaces the extended attribute

EINA_XATTR_REPLACE 

This only succeeds if the extended attribute previously existed

EINA_XATTR_CREATED 

This only succeeds if the extended attribute isn't previously set


Function Documentation

Eina_Bool eina_xattr_double_get ( const char *  file,
const char *  attribute,
double *  value 
)

Gets a double from an extended attribute property.

Since (EFL) :
1.1
Since :
2.3.1
Remarks:
This call makes sure that the double is correctly set.
Parameters:
[in]fileThe file to get the string from
[in]attributeThe attribute to get
[out]valueThe extracted value
Returns:
EINA_TRUE on success, otherwise EINA_FALSE
Eina_Bool eina_xattr_double_set ( const char *  file,
const char *  attribute,
double  value,
Eina_Xattr_Flags  flags 
)

Sets a double as an extended attribute property.

Since (EFL) :
1.1
Since :
2.3.1
Parameters:
[in]fileThe file to set the double to
[in]attributeThe attribute to set
[in]valueThe NULL-terminated double to set
[in]flagsThe flag that defines the set policy
Returns:
EINA_TRUE on success, otherwise EINA_FALSE

Gets an iterator that lists all extended attribute related to a file.

Since (EFL) :
1.2
Since :
2.3.1
Remarks:
The iterator does not allocate any data during the iteration step, so you need to copy them yourself if you need them.
Parameters:
[in]fdThe file descriptor to retrieve the extended attribute list from
Returns:
An iterator
void* eina_xattr_get ( const char *  file,
const char *  attribute,
ssize_t *  size 
)

Gets an extended attribute from a file.

Since (EFL) :
1.1
Since :
2.3.1
Remarks:
It returns NULL and *size is 0 if it fails.
Parameters:
[in]fileThe file to retrieve the extended attribute from
[in]attributeThe extended attribute name to retrieve
[out]sizeThe size of the retrieved extended attribute
Returns:
The allocated data that hold the extended attribute value
Eina_Bool eina_xattr_int_get ( const char *  file,
const char *  attribute,
int *  value 
)

Gets a integer from an extended attribute property.

Since (EFL) :
1.1
Since :
2.3.1
Remarks:
This call makes sure that the integer is correctly set.
Parameters:
[in]fileThe file to get the string from
[in]attributeThe attribute to get
[out]valueThe extracted value
Returns:
EINA_TRUE on success, otherwise EINA_FALSE
Eina_Bool eina_xattr_int_set ( const char *  file,
const char *  attribute,
int  value,
Eina_Xattr_Flags  flags 
)

Sets an integer as a extended attribute property.

Since (EFL) :
1.1
Since :
2.3.1
Parameters:
[in]fileThe file to set the integer to
[in]attributeThe attribute to set
[in]valueThe NULL-terminated integer to set
[in]flagsThe flag that defines the set policy
Returns:
EINA_TRUE on success, otherwise EINA_FALSE
Eina_Iterator* eina_xattr_ls ( const char *  file)

Gets an iterator that lists all the extended attributes of a file.

Since (EFL) :
1.1
Since :
2.3.1
Remarks:
The iterator does not allocate any data during the iteration step, so you need to copy them yourself if you need.
Parameters:
[in]fileThe file name to retrieve the extended attribute list from
Returns:
An iterator
Eina_Bool eina_xattr_set ( const char *  file,
const char *  attribute,
const void *  data,
ssize_t  length,
Eina_Xattr_Flags  flags 
)

Sets an extended attribute to a file.

Since (EFL) :
1.1
Since :
2.3.1
Parameters:
[in]fileThe file to set the extended attribute to
[in]attributeThe attribute to set
[in]dataThe data to set
[in]lengthThe length of the data to set
[in]flagsThe flag that defines the set policy
Returns:
EINA_TRUE on success, otherwise EINA_FALSE
char* eina_xattr_string_get ( const char *  file,
const char *  attribute 
)

Gets a string from an extended attribute property.

Since (EFL) :
1.1
Since :
2.3.1
Remarks:
This call makes sure that the string is properly NULL-terminated before returning it.
Parameters:
[in]fileThe file to get the string from
[in]attributeThe attribute to get
Returns:
A valid string on success, otherwise NULL
Eina_Bool eina_xattr_string_set ( const char *  file,
const char *  attribute,
const char *  data,
Eina_Xattr_Flags  flags 
)

Sets a string as an extended attribute property.

Since (EFL) :
1.1
Since :
2.3.1
Parameters:
[in]fileThe file to set the string to
[in]attributeThe attribute to set
[in]dataThe NULL-terminated string to set
[in]flagsThe flag that defines the set policy
Returns:
EINA_TRUE on success, otherwise EINA_FALSE

Gets an iterator that lists all extended attribute value related to a file.

Since (EFL) :
1.2
Since :
2.3.1
Remarks:
The iterator does not allocate any data during the iteration step, so you need to copy them yourself if you need them. The iterator provides an Eina_Xattr structure.
Parameters:
[in]fdThe file descriptor to retrieve the extended attribute list from
Returns:
An iterator
Eina_Iterator* eina_xattr_value_ls ( const char *  file)

Gets an iterator that lists all the extended attribute values related to a file.

Since (EFL) :
1.2
Since :
2.3.1
Remarks:
The iterator does not allocate any data during the iteration step, so you need to copy them yourself if you need them. The iterator provides an Eina_Xattr structure.
Parameters:
[in]fileThe file name to retrieve the extended attribute list from
Returns:
An iterator

Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause.
For details, see the Content License