本文整理汇总了C++中poco::File::createDirectory方法的典型用法代码示例。如果您正苦于以下问题:C++ File::createDirectory方法的具体用法?C++ File::createDirectory怎么用?C++ File::createDirectory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类poco::File
的用法示例。
在下文中一共展示了File::createDirectory方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoExportGameScripts
int CStatsUtil::DoExportGameScripts()
{
//Validate output + input paths
Poco::Path inpath(m_inputPath);
Poco::Path outpath;
if( m_outputPath.empty() )
outpath = inpath.absolute().makeParent().append(DefExportScriptsDir);
else
outpath = Poco::Path(m_outputPath).makeAbsolute();
Poco::File fTestOut = outpath;
if( ! fTestOut.exists() )
{
cout << "Created output directory \"" << fTestOut.path() <<"\"!\n";
fTestOut.createDirectory();
}
else if( ! fTestOut.isDirectory() )
throw runtime_error("CStatsUtil::DoExportGameScripts(): Output path is not a directory!");
//Setup the script handler
GameScripts scripts( inpath.absolute().toString() );
//Convert to XML
scripts.ExportScriptsToXML( outpath.toString() );
return 0;
}
示例2: DoExportAll
int CStatsUtil::DoExportAll()
{
Poco::Path inpath(m_inputPath);
Poco::Path outpath;
if( m_outputPath.empty() )
{
outpath = inpath.absolute().makeParent().append(DefExportAllDir);
}
else
{
outpath = Poco::Path(m_outputPath).makeAbsolute();
}
GameStats gstats( m_inputPath, m_langconf );
gstats.Load();
//Test output path
Poco::File fTestOut = outpath;
if( ! fTestOut.exists() )
{
cout << "Created output directory \"" << fTestOut.path() <<"\"!\n";
fTestOut.createDirectory();
}
gstats.ExportAll(outpath.toString());
return 0;
}
示例3: before
persist_fixture(f8String& curPath, bool before_clear = true, bool after_clear = false):
before(before_clear),
after(after_clear),
directory(curPath + "/"+ "store")
{
if (before)
{
unlink_directory();
directory.createDirectory();
}
filePer = new FilePersister();
filePer->initialise(curPath + "/" + "store", "utest_log");
}