Enlightenment CVS committal Author : sebastid Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_file Modified Files: Ecore_File.h ecore_file.c Log Message: ecore_file_mv() =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_file/Ecore_File.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- Ecore_File.h 28 Apr 2005 21:53:36 -0000 1.7 +++ Ecore_File.h 11 May 2005 08:52:27 -0000 1.8 @@ -56,6 +56,7 @@ 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 int ecore_file_mv (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); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_file/ecore_file.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- ecore_file.c 4 May 2005 07:15:26 -0000 1.8 +++ ecore_file.c 11 May 2005 08:52:27 -0000 1.9 @@ -119,6 +119,14 @@ return 1; } +int +ecore_file_mv(const char *src, const char *dst) +{ + if (ecore_file_exists(dst)) return 0; + if (rename(src, dst)) return 0; + return 1; +} + char * ecore_file_realpath(const char *file) { ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs