本文整理汇总了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;
}
示例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));
}
示例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();
}