本文整理汇总了C++中FileStream::Modify方法的典型用法代码示例。如果您正苦于以下问题:C++ FileStream::Modify方法的具体用法?C++ FileStream::Modify怎么用?C++ FileStream::Modify使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileStream
的用法示例。
在下文中一共展示了FileStream::Modify方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetAuxTlk
DataStream* CTlkOverride::GetAuxTlk(bool create)
{
char nPath[_MAX_PATH];
PathJoin( nPath, core->CachePath, "default.tot", NULL );
FileStream* fs = new FileStream();
retry:
if (fs->Modify(nPath)) {
return fs;
}
if (create) {
fs->Create( "default", IE_TOT_CLASS_ID);
create = false;
goto retry;
}
delete fs;
return NULL;
}
示例2: FileStream
FileStream *ResourceManager::ModifyCacheFile(const char *filename)
{
FileStream *stream = new FileStream();
if (!stream)
return NULL;
char path[_MAX_PATH];
PathJoin(path, core->CachePath, filename, NULL);
if (!stream->Modify(path)) {
delete stream;
return NULL;
}
return stream;
}
示例3: GetAuxHdr
DataStream* CTlkOverride::GetAuxHdr(bool create)
{
char nPath[_MAX_PATH];
char Signature[TOH_HEADER_SIZE];
PathJoin( nPath, core->CachePath, "default.toh", NULL );
FileStream* fs = new FileStream();
retry:
if (fs->Modify(nPath)) {
return fs;
}
if (create) {
fs->Create( "default", IE_TOH_CLASS_ID);
memset(Signature,0,sizeof(Signature));
memcpy(Signature,"TLK ",4);
fs->Write(Signature, sizeof(Signature));
create = false;
goto retry;
}
delete fs;
return NULL;
}