filemgr question | developer.brewmp.com filemgr question | developer.brewmp.com

Developer

filemgr question

Forums:

when i use IFILEMGR_EnumInit & IFILEMGR_EnumNext to delete folder in one directory ,i find it can not delete the third one , for example,there are 4 folder (box1, box2, box3, box4)in "fs:/shared/email/account/act0002", it will delete box1,box2,box4, jump over the box 3 , why ? what's wrong with it?? :confused:

the code is just as follow: :( somebody help me ?

{
uint32 uiEnumRet = TRUE;
FileInfo FInfo = {0};
int iRet = SUCCESS;
iRet = IFILEMGR_EnumInit(pMe>piFileMgr,"fs:/shared/email/account/act0002",TRUE);
while (TRUE == uiEnumRet)
{
MEMSET(&FInfo,0,sizeof(FileInfo));
uiEnumRet = IFILEMGR_EnumNext(pMe->piFileMgr,&FInfo);
if (FALSE == uiEnumRet)
{
break;
}
DBGPRINTF("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
DBGPRINTF("~~~~~~~~FInfo.szName is %s ",FInfo.szName);
DBGPRINTF("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
iRet = IFILEMGR_RmDir(pMe->piFileMgr,FInfo.szName);
}