PHP源码:
static void RmDirRecursive(DemoApplet* app,const char* name)
{
IShell* shell = app->a.m_pIShell;
IFileMgr* filemgr;
FileInfo info;
ISHELL_CreateInstance(shell,AEECLSID_FILEMGR,(void*)&filemgr);
IFILEMGR_EnumInit(filemgr,name,TRUE);
while (IFILEMGR_EnumNext(filemgr,&info))
{
RmDirRecursive(app,info.szName);
}
IFILEMGR_EnumInit(filemgr,name,FALSE);
while (IFILEMGR_EnumNext(filemgr,&info))
{
IFILEMGR_Remove(filemgr,info.szName);
}
IFILEMGR_RmDir(filemgr,name);
IFILEMGR_Release(filemgr);
return;
}
RmDirRecursive(app,"target_dir");
本文地址:http://com.8s8s.com/it/it33132.htm