diff --git a/src/include/switch_apr.h b/src/include/switch_apr.h index 601fb74ff2..b4a0d96184 100644 --- a/src/include/switch_apr.h +++ b/src/include/switch_apr.h @@ -720,6 +720,8 @@ SWITCH_DECLARE(switch_status_t) switch_file_close(switch_file_t * thefile); */ SWITCH_DECLARE(switch_status_t) switch_file_remove(const char *path, switch_memory_pool_t *pool); +SWITCH_DECLARE(switch_status_t) switch_file_rename(const char *from_path, const char *to_path, switch_memory_pool_t *pool); + /** * Read data from the specified file. * @param thefile The file descriptor to read from. diff --git a/src/switch_apr.c b/src/switch_apr.c index 33ca647b25..2f34e001f7 100644 --- a/src/switch_apr.c +++ b/src/switch_apr.c @@ -328,6 +328,11 @@ SWITCH_DECLARE(switch_status_t) switch_file_close(switch_file_t * thefile) return apr_file_close(thefile); } +SWITCH_DECLARE(switch_status_t) switch_file_rename(const char *from_path, const char *to_path, switch_memory_pool_t *pool) +{ + return apr_file_rename(from_path, to_path, pool); +} + SWITCH_DECLARE(switch_status_t) switch_file_remove(const char *path, switch_memory_pool_t *pool) { return apr_file_remove(path, pool);