closedir(dir);
return ret;
}
-
-void uapi_delete_files(const char *file_path)
+/*删除文件*/
+int uapi_delete_files(const char *file_path)
{
struct stat s_buf;
int ret = 0;
if(access(file_path, F_OK) == -1)
{
PRINT("%s does not exist!!!\r\n", file_path);
- return;
+ return 0 ;
}
stat(file_path,&s_buf);
if(S_ISDIR(s_buf.st_mode))
else
ret = remove(file_path);
if(ret != 0)
+ {
PRINT("%s remove failed !!! \r\n",file_path);
+ return 0;
+ }
else
+ {
PRINT("%s remove succeed !!! \r\n",file_path);
+ return 1;
+ }
+
}
int uapi_tar_file(const char *src_path,const char *tar_path,char *tarfilename)
errcode_t uapi_custom_cmd_service_init(void);
void do_custom_cmd_service_check_msg(int cmd, void *params, int paramlen);
-void uapi_delete_files(const char *file_path);
+int uapi_delete_files(const char *file_path);
void uapi_restore_factory_setting(void);
void custom_i2c_reset(void);