diff --git a/legacy/ecore/src/lib/ecore_file/Ecore_File.h b/legacy/ecore/src/lib/ecore_file/Ecore_File.h index 12c8646eda..be3aca49a1 100644 --- a/legacy/ecore/src/lib/ecore_file/Ecore_File.h +++ b/legacy/ecore/src/lib/ecore_file/Ecore_File.h @@ -53,12 +53,14 @@ extern "C" { EAPI int ecore_file_exists (const char *file); EAPI int ecore_file_is_dir (const char *file); EAPI int ecore_file_mkdir (const char *dir); + EAPI int ecore_file_rmdir (const char *dir); EAPI int ecore_file_mkpath (const char *path); EAPI int ecore_file_cp (const char *src, const char *dst); EAPI char *ecore_file_realpath (const char *file); + EAPI int ecore_file_unlink (const char *file); EAPI char *ecore_file_get_file (char *path); EAPI char *ecore_file_get_dir (char *path); - + EAPI int ecore_file_can_exec (const char *file); EAPI char *ecore_file_readlink (const char *link); EAPI Ecore_List *ecore_file_ls (const char *dir); diff --git a/legacy/ecore/src/lib/ecore_file/ecore_file.c b/legacy/ecore/src/lib/ecore_file/ecore_file.c index 7d9676d5e3..ffde280055 100644 --- a/legacy/ecore/src/lib/ecore_file/ecore_file.c +++ b/legacy/ecore/src/lib/ecore_file/ecore_file.c @@ -57,6 +57,20 @@ ecore_file_mkdir(const char *dir) return 1; } +int +ecore_file_rmdir(const char *dir) +{ + if (rmdir(dir) < 0) return 0; + return 1; +} + +int +ecore_file_unlink(const char *file) +{ + if (unlink(file) < 0) return 0; + return 1; +} + int ecore_file_mkpath(const char *path) {