summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2009-12-19 19:09:37 +0000
committerVincent Torri <vincent.torri@gmail.com>2009-12-19 19:09:37 +0000
commit5cffd43943bab95751b84dc5123c1f90695c7442 (patch)
tree4f8e46478e5c6befcc521857dd17292b8b9f0631 /legacy
parent8e9e67f075b049f944e5d77717bda0d333160ebc (diff)
add a wrapper around remove()
SVN revision: 44578
Diffstat (limited to 'legacy')
-rw-r--r--legacy/ecore/src/lib/ecore_file/Ecore_File.h1
-rw-r--r--legacy/ecore/src/lib/ecore_file/ecore_file.c12
2 files changed, 13 insertions, 0 deletions
diff --git a/legacy/ecore/src/lib/ecore_file/Ecore_File.h b/legacy/ecore/src/lib/ecore_file/Ecore_File.h
index 4f236975ac..4d22470e17 100644
--- a/legacy/ecore/src/lib/ecore_file/Ecore_File.h
+++ b/legacy/ecore/src/lib/ecore_file/Ecore_File.h
@@ -81,6 +81,7 @@ extern "C" {
81 EAPI int ecore_file_symlink (const char *src, const char *dest); 81 EAPI int ecore_file_symlink (const char *src, const char *dest);
82 EAPI char *ecore_file_realpath (const char *file); 82 EAPI char *ecore_file_realpath (const char *file);
83 EAPI int ecore_file_unlink (const char *file); 83 EAPI int ecore_file_unlink (const char *file);
84 EAPI int ecore_file_remove (const char *file);
84 EAPI const char *ecore_file_file_get (const char *path); 85 EAPI const char *ecore_file_file_get (const char *path);
85 EAPI char *ecore_file_dir_get (const char *path); 86 EAPI char *ecore_file_dir_get (const char *path);
86 87
diff --git a/legacy/ecore/src/lib/ecore_file/ecore_file.c b/legacy/ecore/src/lib/ecore_file/ecore_file.c
index 064016ae80..318d6fff19 100644
--- a/legacy/ecore/src/lib/ecore_file/ecore_file.c
+++ b/legacy/ecore/src/lib/ecore_file/ecore_file.c
@@ -296,6 +296,18 @@ ecore_file_unlink(const char *file)
296} 296}
297 297
298/** 298/**
299 * Remove the given file or directory
300 * @param file The name of the file or directory to delete
301 * @return 1 on success, 0 on failure
302 */
303EAPI int
304ecore_file_remove(const char *file)
305{
306 if (remove(file) < 0) return 0;
307 return 1;
308}
309
310/**
299 * Delete a directory and all its contents 311 * Delete a directory and all its contents
300 * @param dir The name of the directory to delete 312 * @param dir The name of the directory to delete
301 * @return 1 on success, 0 on failure 313 * @return 1 on success, 0 on failure