shithub: lwext4

Download patch

ref: 53b4f91981f5898473830d53c24c27e17f83a8a1
parent: 0202d13dec910d55acc5b92c290b9aaa72d8b691
author: gkostka <kostka.grzegorz@gmail.com>
date: Thu Mar 31 16:47:43 EDT 2016

ext4: add rename/move directory procedure to main API

--- a/include/ext4.h
+++ b/include/ext4.h
@@ -426,6 +426,12 @@
  * @return  standard error code*/
 int ext4_dir_rm(const char *path);
 
+/**@brief Rename/move directory
+ * @param path source
+ * @param new_path destination
+ * @return  standard error code */
+int ext4_dir_mv(const char *path, const char *new_path);
+
 /**@brief   Create new directory.
  * @param   name new directory name
  * @return  standard error code*/
--- a/src/ext4.c
+++ b/src/ext4.c
@@ -2890,6 +2890,11 @@
 	return r;
 }
 
+int ext4_dir_mv(const char *path, const char *new_path)
+{
+	return ext4_frename(path, new_path);
+}
+
 int ext4_dir_mk(const char *path)
 {
 	int r;