添加清空前检查功能
同步删除tosend.ini文件
This commit is contained in:
parent
bd8e6381da
commit
05678a7944
@ -22,6 +22,7 @@ extern rt_sem_t okToreport;
|
||||
extern void resetTM(void);
|
||||
unsigned long getFileSize(char *file);
|
||||
void updateSysRTC(uint8_t *din, size_t len);
|
||||
int isFileExit(char *f);
|
||||
#define CFG_ACK
|
||||
/**
|
||||
* 配置文件后的ack信号
|
||||
@ -956,8 +957,13 @@ void clearAllData()
|
||||
//去掉原static
|
||||
//static int cmd_rm(int argc, char **argv)
|
||||
//MSH_CMD_EXPORT_ALIAS(cmd_rm, rm, Remove(unlink) the FILE(s).);
|
||||
char *arg[]={"rm","-r",ROOT_PATH_DATA};
|
||||
cmd_rm(3,arg);
|
||||
DIR *dir = opendir(ROOT_PATH_DATA);
|
||||
if (dir && isFileExit("/sd/tosend.ini"))
|
||||
{
|
||||
closedir(dir);
|
||||
char *arg[]={"rm","-r",ROOT_PATH_DATA,"/sd/tosend.ini" };
|
||||
cmd_rm(4,arg);
|
||||
}
|
||||
LOG_D("files deleted.");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user