summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgkostka <kostka.grzegorz@gmail.com>2016-03-31 20:47:43 +0200
committergkostka <kostka.grzegorz@gmail.com>2016-03-31 22:54:17 +0200
commit53b4f91981f5898473830d53c24c27e17f83a8a1 (patch)
treedb1ebbd92ab11aa0df4c8aa10e2a47d3051d0160
parent0202d13dec910d55acc5b92c290b9aaa72d8b691 (diff)
ext4: add rename/move directory procedure to main API
-rw-r--r--include/ext4.h6
-rw-r--r--src/ext4.c5
2 files changed, 11 insertions, 0 deletions
diff --git a/include/ext4.h b/include/ext4.h
index 78e8647..102802c 100644
--- a/include/ext4.h
+++ b/include/ext4.h
@@ -426,6 +426,12 @@ int ext4_removexattr(const char *path, const char *name, size_t name_len);
* @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*/
diff --git a/src/ext4.c b/src/ext4.c
index 78afe9b..b284648 100644
--- a/src/ext4.c
+++ b/src/ext4.c
@@ -2890,6 +2890,11 @@ End:
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;