本文整理汇总了C++中CFileList::InsertAfter方法的典型用法代码示例。如果您正苦于以下问题:C++ CFileList::InsertAfter方法的具体用法?C++ CFileList::InsertAfter怎么用?C++ CFileList::InsertAfter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFileList
的用法示例。
在下文中一共展示了CFileList::InsertAfter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: List
void CFileContainerArc::List(CFileList &list, const char *mask, unsigned flags)
{
TString<256> Path; Path = mask;
char *name = Path.rchr('/');
FDirInfo *Dir;
if (name)
{
*name++ = 0;
Dir = FindDir(Path);
if (!Dir) return; // directory not found
}
else
{
name = Path;
Dir = &Root;
}
// list directories and files
#if FS_DIR != FS_FILE<<1
#error Check FS_DIR / FS_FILE relationship
#endif
for (unsigned Flag = FS_FILE; Flag <= FS_DIR; Flag <<= 1)
{
if (!(flags & Flag)) continue;
CListIterator it;
if (Flag == FS_FILE) // cannot write this as "it = (Flag == FS_FILE) ? ..."
it = Dir->Files;
else
it = Dir->Dirs;
for ( ; it; ++it)
{
if (!appMatchWildcard(it->name, name)) continue;
TString<256> Name; Name = it->name;
// process NOEXT
if (flags & FS_NOEXT)
{
char *s = Name.rchr('.');
if (s) *s = 0;
}
CFileItem *item, *place;
if (!(item = list.Find(Name, &place)))
{
item = new (Name, &list) CFileItem;
// here: item->flags=0
list.InsertAfter(item, place);
}
item->flags |= containFlags|Flag;
}
}
}