ecore_file_mv()

SVN revision: 14703
This commit is contained in:
sebastid 2005-05-11 08:52:27 +00:00 committed by sebastid
parent e600739282
commit a63963d14b
2 changed files with 9 additions and 0 deletions

View File

@ -56,6 +56,7 @@ extern "C" {
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);

View File

@ -119,6 +119,14 @@ ecore_file_cp(const char *src, const char *dst)
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)
{