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


C++ Owned::createDirectory方法代码示例

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


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

示例1: EnsureDirectory

bool CLogSerializer::EnsureDirectory(StringBuffer& Dir)
{
    try{
        Owned<IFile> pDirectory = createIFile(Dir.str());
        if(pDirectory->exists() == true)
            return true;
        return pDirectory->createDirectory();
    }
    catch(IException *ex)
    {
        ex->Release();
    }
    return false;
}
开发者ID:Josh-Googler,项目名称:HPCC-Platform,代码行数:14,代码来源:LogSerializer.cpp

示例2: open

    void open()
    {
        char drive       [_MAX_DRIVE];
        char dir         [_MAX_DIR];
        char fname       [_MAX_DIR];
        char ext         [_MAX_EXT];
        _splitpath(fileName.str(), drive, dir, fname, ext);

        StringBuffer directory;
        directory.append(drive).append(dir);

        Owned<IFile> cd = createIFile(directory.str());
        cd->createDirectory();

        IHThorSpillArg *helper = (IHThorSpillArg *)queryHelper();
        void *ekey;
        size32_t ekeylen;
        helper->getEncryptKey(ekeylen,ekey);
        Owned<ICompressor> ecomp;
        if (ekeylen!=0)
        {
            ecomp.setown(createAESCompressor256(ekeylen,ekey));
            memset(ekey,0,ekeylen);
            free(ekey);
            compress = true;
        }
        Owned<IFile> file = createIFile(fileName.str());
        Owned<IFileIO> iFileIO;
        bool fixedRecordSize = queryRowMetaData()->isFixedSize();
        size32_t minrecsize = queryRowMetaData()->getMinRecordSize();

        if (fixedRecordSize)
            ActPrintLog("SPILL: created fixed output %s recsize=%u", (0!=ekeylen)?"[encrypted]":compress?"[compressed]":"",minrecsize);
        else
            ActPrintLog("SPILL: created variable output %s, minrecsize=%u", (0!=ekeylen)?"[encrypted]":compress?"[compressed]":"",minrecsize);
        unsigned rwFlags = (DEFAULT_RWFLAGS & ~rw_autoflush); // flushed by close()
        if (compress)
            rwFlags |= rw_compress;
        else
            rwFlags |= rw_crc; // only if !compress
        if (grouped)
            rwFlags |= rw_grouped;
        out.setown(createRowWriter(file, this, rwFlags));
    }
开发者ID:RobertoMalatesta,项目名称:HPCC-Platform,代码行数:44,代码来源:thspillslave.cpp

示例3: Init

void CLocalDataLogger::Init(const char* logDirectory,const char* ext,const char* UrlRoot, unsigned TimerPeriod,unsigned CacheTimeoutPeriod)
{
    if(!logDirectory || !ext)
        throw MakeStringException(-1,"Invalid parameters passed to cLocalDataLogger::Init");
    StringBuffer pathtodir;
    pathtodir.appendf("%s",logDirectory);

    Owned<IFile> pDirectory = createIFile(pathtodir.str());
    if(pDirectory->exists() == false)
        pDirectory->createDirectory();

    m_UrlRoot.appendf("%s",UrlRoot);

    m_logDirectory.append(logDirectory);
    StringBuffer dirpath;
    dirpath.appendf("%s",logDirectory);
    m_CleanupThread.setown(new CFileCleanupThread(dirpath,ext,TimerPeriod,CacheTimeoutPeriod));
    m_CleanupThread->start();
}
开发者ID:Josh-Googler,项目名称:HPCC-Platform,代码行数:19,代码来源:LocalDataLogger.cpp


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