当前位置: 首页>>代码示例>>C++>>正文


C++ Folder::has方法代码示例

本文整理汇总了C++中Folder::has方法的典型用法代码示例。如果您正苦于以下问题:C++ Folder::has方法的具体用法?C++ Folder::has怎么用?C++ Folder::has使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Folder的用法示例。


在下文中一共展示了Folder::has方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: populate

Feed::PopulatedFiles StaticLibraryFeed::populate(Folder const &folder)
{
    PopulatedFiles files;
#if defined (DENG_STATIC_LINK)
    for (String name : Library::staticLibraries())
    {
        if (!folder.has(name))
        {
            files << new LibraryFile(NativePath(name));
        }
    }
#else
    DENG2_UNUSED(folder);
#endif
    return files;
}
开发者ID:,项目名称:,代码行数:16,代码来源:

示例2: populate

    void populate(Folder &folder)
    {
        // Get a list of the files in this directory.
        Archive::Names names;
        archive().listFiles(names, basePath);

        DENG2_FOR_EACH(Archive::Names, i, names)
        {
            if(folder.has(*i))
            {
                // Already has an entry for this, skip it (wasn't pruned so it's OK).
                continue;
            }

            String entry = basePath / *i;

            std::auto_ptr<ArchiveEntryFile> archFile(new ArchiveEntryFile(*i, archive(), entry));

            // Write access is inherited from the main source file.
            if(allowWrite) archFile->setMode(File::Write);

            // Use the status of the entry within the archive.
            archFile->setStatus(archive().entryStatus(entry));

            // Create a new file that accesses this feed's archive and interpret the contents.
            File *f = folder.fileSystem().interpret(archFile.release());
            folder.add(f);

            // We will decide on pruning this.
            f->setOriginFeed(&self);

            // Include the file in the main index.
            folder.fileSystem().index(*f);
        }

        // Also populate subfolders.
        archive().listFolders(names, basePath);

        for(Archive::Names::iterator i = names.begin(); i != names.end(); ++i)
        {
            folder.fileSystem().makeFolder(folder.path() / *i, FS::InheritPrimaryFeed);
        }
    }
开发者ID:gnuzinho,项目名称:Doomsday-Engine,代码行数:43,代码来源:archivefeed.cpp


注:本文中的Folder::has方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。