forked from enlightenment/efl
eina: add eina_file_dup.
This commit is contained in:
parent
080ce9316b
commit
06cd16548c
|
@ -1,6 +1,7 @@
|
|||
2013-06-04 Cedric Bail
|
||||
|
||||
* Evas: correctly detect if loader support asynchronous preloading.
|
||||
* Eina: add eina_file_dup.
|
||||
|
||||
2013-06-03 Ederson Desouza
|
||||
|
||||
|
|
3
NEWS
3
NEWS
|
@ -27,7 +27,8 @@ Additions:
|
|||
- Add eina_log_timing()
|
||||
- Add eina_inlist_first
|
||||
- Add eina_inlist_last
|
||||
- Added eina_str_convert_len() to work around broken eina_str_convert()
|
||||
- Add eina_str_convert_len() to work around broken eina_str_convert()
|
||||
- Add eina_file_dup()
|
||||
* eet:
|
||||
- Add eet_mmap()
|
||||
- Add eet_data_descriptor_name_get()
|
||||
|
|
|
@ -459,6 +459,18 @@ EAPI Eina_Bool eina_file_copy(const char *src, const char *dst, Eina_File_Copy_F
|
|||
*/
|
||||
EAPI Eina_File *eina_file_open(const char *name, Eina_Bool shared) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
|
||||
|
||||
/**
|
||||
* @brief Dup a read-only handler of a previously open file.
|
||||
*
|
||||
* @param file To duplicate a reference to
|
||||
* @return Eina_File handle to the duplicated file
|
||||
*
|
||||
* Opens a file in read-only mode.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
EAPI Eina_File * eina_file_dup(Eina_File *file);
|
||||
|
||||
/**
|
||||
* @brief Unref file handler.
|
||||
*
|
||||
|
|
|
@ -152,6 +152,13 @@ eina_file_path_sanitize(const char *path)
|
|||
return _eina_file_escape(eina_file_cleanup(result), len);
|
||||
}
|
||||
|
||||
EAPI Eina_File *
|
||||
eina_file_dup(Eina_File *file)
|
||||
{
|
||||
if (file) file->refcount++;
|
||||
return file;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
eina_file_close(Eina_File *file)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue