Eio manipulation of eXtended attribute.

- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

Functions
Eio manipulation of eXtended attribute.
Eio

A set of function to manipulate data associated with a specific file. More...

## Functions
EIO_API Eio_File * | eio_file_xattr (const char *path, Eio_Filter_Cb filter_cb, Eio_Main_Cb main_cb, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
| Asynchronously list all eXtended attribute.
EIO_API Eio_File * | eio_file_xattr_int_set (const char *path, const char *attribute, int xattr_int, Eina_Xattr_Flags flags, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
| Define an extended attribute on a file/directory.
EIO_API Eio_File * | eio_file_xattr_double_set (const char *path, const char *attribute, double xattr_double, Eina_Xattr_Flags flags, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
| Define an extended attribute on a file/directory.
EIO_API Eio_File * | eio_file_xattr_string_set (const char *path, const char *attribute, const char *xattr_string, Eina_Xattr_Flags flags, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
| Define a string extended attribute on a file/directory.
EIO_API Eio_File * | eio_file_xattr_set (const char *path, const char *attribute, const char *xattr_data, unsigned int xattr_size, Eina_Xattr_Flags flags, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
| Define an extended attribute on a file/directory.
EIO_API Eio_File * | eio_file_xattr_get (const char *path, const char *attribute, Eio_Done_Data_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
| Retrieve the extended attribute of a file/directory.
EIO_API Eio_File * | eio_file_xattr_int_get (const char *path, const char *attribute, Eio_Done_Int_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
| Retrieve a extended attribute of a file/directory.
EIO_API Eio_File * | eio_file_xattr_double_get (const char *path, const char *attribute, Eio_Done_Double_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
| Retrieve a extended attribute of a file/directory.
EIO_API Eio_File * | eio_file_xattr_string_get (const char *path, const char *attribute, Eio_Done_String_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
| Retrieve a string extended attribute of a file/directory.

## Detailed Description

A set of function to manipulate data associated with a specific file.

The functions provided by this API are responsible to manage Extended attribute files. Like file authors, character encoding, checksum, etc.

## Function Documentation

## ◆ eio_file_xattr()

EIO_API Eio_File * eio_file_xattr | ( | const char * | path,
|  | Eio_Filter_Cb | filter_cb,
|  | Eio_Main_Cb | main_cb,
|  | Eio_Done_Cb | done_cb,
|  | Eio_Error_Cb | error_cb,
|  | const void * | data
| ) |  |

Asynchronously list all eXtended attribute.

Parameters

  path | The path to get the eXtended attribute from.
  filter_cb | Callback called in the thread to validate the eXtended attribute.
  main_cb | Callback called in the main loop for each accepted eXtended attribute.
  done_cb | Callback called in the main loop when the all the eXtended attribute have been listed.
  error_cb | Callback called in the main loop when something goes wrong during the listing of the eXtended attribute.
  data | Unmodified user data passed to callbacks

Returns
  A reference to the I/O operation.

References EINA_SAFETY_ON_NULL_RETURN_VAL.

## ◆ eio_file_xattr_int_set()

EIO_API Eio_File * eio_file_xattr_int_set | ( | const char * | path,
|  | const char * | attribute,
|  | int | xattr_int,
|  | Eina_Xattr_Flags | flags,
|  | Eio_Done_Cb | done_cb,
|  | Eio_Error_Cb | error_cb,
|  | const void * | data
| ) |  |

Define an extended attribute on a file/directory.

Parameters

  path | The path to set the attribute on.
  attribute | The name of the attribute to define.
  xattr_int | The value to link the attribute with.
  flags | Whether to insert, replace or create the attribute.
  done_cb | The callback called from the main loop when setxattr succeeded.
  error_cb | The callback called from the main loop when setxattr failed.
  data | Unmodified user data passed to callbacks

Returns
  A reference to the I/O operation.

eio_file_xattr_int_set calls eina_xattr_int_set from another thread. This prevents blocking in your apps. If the writing succeeded, the done_cb will be called even if a cancel was requested, but came too late.

References EINA_SAFETY_ON_NULL_RETURN_VAL.

## ◆ eio_file_xattr_double_set()

EIO_API Eio_File * eio_file_xattr_double_set | ( | const char * | path,
|  | const char * | attribute,
|  | double | xattr_double,
|  | Eina_Xattr_Flags | flags,
|  | Eio_Done_Cb | done_cb,
|  | Eio_Error_Cb | error_cb,
|  | const void * | data
| ) |  |

Define an extended attribute on a file/directory.

Parameters

  path | The path to set the attribute on.
  attribute | The name of the attribute to define.
  xattr_double | The value to link the attribute with.
  flags | Whether to insert, replace or create the attribute.
  done_cb | The callback called from the main loop when setxattr succeeded.
  error_cb | The callback called from the main loop when setxattr failed.
  data | Unmodified user data passed to callbacks

Returns
  A reference to the I/O operation.

eio_file_xattr_double_set calls eina_xattr_double_set from another thread. This prevents blocking in your apps. If the writing succeeded, the done_cb will be called even if a cancel was requested, but came too late.

References EINA_SAFETY_ON_NULL_RETURN_VAL.

Referenced by emotion_object_last_position_save().

## ◆ eio_file_xattr_string_set()

EIO_API Eio_File * eio_file_xattr_string_set | ( | const char * | path,
|  | const char * | attribute,
|  | const char * | xattr_string,
|  | Eina_Xattr_Flags | flags,
|  | Eio_Done_Cb | done_cb,
|  | Eio_Error_Cb | error_cb,
|  | const void * | data
| ) |  |

Define a string extended attribute on a file/directory.

Parameters

  path | The path to set the attribute on.
  attribute | The name of the attribute to define.
  xattr_string | The string to link the attribute with.
  flags | Whether to insert, replace or create the attribute.
  done_cb | The callback called from the main loop when setxattr succeeded.
  error_cb | The callback called from the main loop when setxattr failed.
  data | Unmodified user data passed to callbacks

Returns
  A reference to the I/O operation.

eio_file_xattr_string_set calls eina_xattr_string_set from another thread. This prevents blocking in your apps. If the writing succeeded, the done_cb will be called even if a cancel was requested, but came too late.

References EINA_SAFETY_ON_NULL_RETURN_VAL.

## ◆ eio_file_xattr_set()

EIO_API Eio_File * eio_file_xattr_set | ( | const char * | path,
|  | const char * | attribute,
|  | const char * | xattr_data,
|  | unsigned int | xattr_size,
|  | Eina_Xattr_Flags | flags,
|  | Eio_Done_Cb | done_cb,
|  | Eio_Error_Cb | error_cb,
|  | const void * | data
| ) |  |

Define an extended attribute on a file/directory.

Parameters

  path | The path to set the attribute on.
  attribute | The name of the attribute to define.
  xattr_data | The data to link the attribute with.
  xattr_size | The size of the data to set.
  flags | Whether to insert, replace or create the attribute.
  done_cb | The callback called from the main loop when setxattr succeeded.
  error_cb | The callback called from the main loop when setxattr failed.
  data | Unmodified user data passed to callbacks

Returns
  A reference to the I/O operation.

eio_file_xattr_set calls setxattr from another thread. This prevents blocking in your apps. If the writing succeeded, the done_cb will be called even if a cancel was requested, but came too late.

References EINA_SAFETY_ON_FALSE_RETURN_VAL, and EINA_SAFETY_ON_NULL_RETURN_VAL.

## ◆ eio_file_xattr_get()

EIO_API Eio_File * eio_file_xattr_get | ( | const char * | path,
|  | const char * | attribute,
|  | Eio_Done_Data_Cb | done_cb,
|  | Eio_Error_Cb | error_cb,
|  | const void * | data
| ) |  |

Retrieve the extended attribute of a file/directory.

Parameters

  path | The path to retrieve the extended attribute from.
  attribute | The name of the attribute to retrieve.
  done_cb | Callback called from the main loop when getxattr succeeded.
  error_cb | Callback called from the main loop when getxattr failed or has been canceled.
  data | Unmodified user data passed to callbacks

Returns
  A reference to the I/O operation.

eio_file_xattr_get calls getxattr from another thread. This prevents blocking in your apps.

References EINA_SAFETY_ON_NULL_RETURN_VAL.

## ◆ eio_file_xattr_int_get()

EIO_API Eio_File * eio_file_xattr_int_get | ( | const char * | path,
|  | const char * | attribute,
|  | Eio_Done_Int_Cb | done_cb,
|  | Eio_Error_Cb | error_cb,
|  | const void * | data
| ) |  |

Retrieve a extended attribute of a file/directory.

Parameters

  path | The path to retrieve the extended attribute from.
  attribute | The name of the attribute to retrieve.
  done_cb | Callback called from the main loop when getxattr succeeded.
  error_cb | Callback called from the main loop when getxattr failed or has been canceled.
  data | Unmodified user data passed to callbacks

Returns
  A reference to the I/O operation.

eio_file_xattr_int_get calls eina_xattr_int_get from another thread. This prevents blocking in your apps.

References EINA_SAFETY_ON_NULL_RETURN_VAL.

## ◆ eio_file_xattr_double_get()

EIO_API Eio_File * eio_file_xattr_double_get | ( | const char * | path,
|  | const char * | attribute,
|  | Eio_Done_Double_Cb | done_cb,
|  | Eio_Error_Cb | error_cb,
|  | const void * | data
| ) |  |

Retrieve a extended attribute of a file/directory.

Parameters

  path | The path to retrieve the extended attribute from.
  attribute | The name of the attribute to retrieve.
  done_cb | Callback called from the main loop when getxattr succeeded.
  error_cb | Callback called from the main loop when getxattr failed or has been canceled.
  data | Unmodified user data passed to callbacks

Returns
  A reference to the I/O operation.

eio_file_xattr_double_get calls eina_xattr_double_get from another thread. This prevents blocking in your apps.

References EINA_SAFETY_ON_NULL_RETURN_VAL.

Referenced by emotion_object_last_position_load().

## ◆ eio_file_xattr_string_get()

EIO_API Eio_File * eio_file_xattr_string_get | ( | const char * | path,
|  | const char * | attribute,
|  | Eio_Done_String_Cb | done_cb,
|  | Eio_Error_Cb | error_cb,
|  | const void * | data
| ) |  |

Retrieve a string extended attribute of a file/directory.

Parameters

  path | The path to retrieve the extended attribute from.
  attribute | The name of the attribute to retrieve.
  done_cb | Callback called from the main loop when getxattr succeeded.
  error_cb | Callback called from the main loop when getxattr failed or has been canceled.
  data | Unmodified user data passed to callbacks

Returns
  A reference to the I/O operation.

eio_file_xattr_string_get calls eina_xattr_string_get from another thread. This prevents blocking in your apps.

References EINA_SAFETY_ON_NULL_RETURN_VAL.