diff --git a/legacy/eet/ChangeLog b/legacy/eet/ChangeLog index 0b3c5fbe65..e5e0936e4a 100644 --- a/legacy/eet/ChangeLog +++ b/legacy/eet/ChangeLog @@ -546,3 +546,7 @@ * JPEG encode and decode in eet now uses ISLOW (not IFAST) due to noticable quality losses in the chase for speed. It will use IFAST for quality less than 60 when encoding + +2011-12-02 Mike Blumenkrantz + + * added eet_file_get to return the filename of an Eet_File diff --git a/legacy/eet/src/lib/Eet.h b/legacy/eet/src/lib/Eet.h index 8fda1e0963..d0f43a5672 100644 --- a/legacy/eet/src/lib/Eet.h +++ b/legacy/eet/src/lib/Eet.h @@ -774,6 +774,19 @@ eet_alias(Eet_File *ef, const char *destination, int compress); +/** + * Retrieve the filename of an Eet_File + * @param ef A valid eet file handle opened for writing. + * @return The file opened with eet_open(), or NULL on error + * + * @note This function will return NULL for files opened with eet_memopen_read() + * + * @since 1.6 + * @ingroup Eet_File_Group + */ +EAPI const char * +eet_file_get(Eet_File *ef); + /** * Retrieve the destination name of an alias * @param ef A valid eet file handle opened for writing diff --git a/legacy/eet/src/lib/eet_lib.c b/legacy/eet/src/lib/eet_lib.c index a0d64350f3..dabff875b8 100644 --- a/legacy/eet/src/lib/eet_lib.c +++ b/legacy/eet/src/lib/eet_lib.c @@ -1479,6 +1479,13 @@ eet_memopen_read(const void *data, return ef; } /* eet_memopen_read */ +EAPI const char * +eet_file_get(Eet_File *ef) +{ + if (eet_check_pointer(ef)) return NULL; + return ef->path; +} + EAPI Eet_File * eet_open(const char *file, Eet_File_Mode mode)