summaryrefslogtreecommitdiff
path: root/core/src/xmake/os/emptydir.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/xmake/os/emptydir.c')
-rw-r--r--core/src/xmake/os/emptydir.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/core/src/xmake/os/emptydir.c b/core/src/xmake/os/emptydir.c
index 409a1445b..aab016d28 100644
--- a/core/src/xmake/os/emptydir.c
+++ b/core/src/xmake/os/emptydir.c
@@ -22,8 +22,8 @@
/* //////////////////////////////////////////////////////////////////////////////////////
* trace
*/
-#define TB_TRACE_MODULE_NAME "emptydir"
-#define TB_TRACE_MODULE_DEBUG (0)
+#define TB_TRACE_MODULE_NAME "emptydir"
+#define TB_TRACE_MODULE_DEBUG (0)
/* //////////////////////////////////////////////////////////////////////////////////////
* includes
@@ -33,15 +33,12 @@
/* //////////////////////////////////////////////////////////////////////////////////////
* private implementation
*/
-static tb_long_t xm_os_emptydir_walk(tb_char_t const* path, tb_file_info_t const* info, tb_cpointer_t priv)
-{
- // check
- tb_bool_t* is_emptydir = (tb_bool_t*)priv;
+static tb_long_t xm_os_emptydir_walk(tb_char_t const *path, tb_file_info_t const *info, tb_cpointer_t priv) {
+ tb_bool_t *is_emptydir = (tb_bool_t *)priv;
tb_assert_and_check_return_val(path && info && is_emptydir, TB_DIRECTORY_WALK_CODE_END);
// is emptydir?
- if (info->type == TB_FILE_TYPE_FILE || info->type == TB_FILE_TYPE_DIRECTORY)
- {
+ if (info->type == TB_FILE_TYPE_FILE || info->type == TB_FILE_TYPE_DIRECTORY) {
*is_emptydir = tb_false;
return tb_false;
}
@@ -51,13 +48,11 @@ static tb_long_t xm_os_emptydir_walk(tb_char_t const* path, tb_file_info_t const
/* //////////////////////////////////////////////////////////////////////////////////////
* implementation
*/
-tb_int_t xm_os_emptydir(lua_State* lua)
-{
- // check
+tb_int_t xm_os_emptydir(lua_State *lua) {
tb_assert_and_check_return_val(lua, 0);
// get the directory
- tb_char_t const* dir = luaL_checkstring(lua, 1);
+ tb_char_t const *dir = luaL_checkstring(lua, 1);
tb_check_return_val(dir, 0);
// os.emptydir(dir)