本文整理汇总了C++中FileSystem::DestroyFileObject方法的典型用法代码示例。如果您正苦于以下问题:C++ FileSystem::DestroyFileObject方法的具体用法?C++ FileSystem::DestroyFileObject怎么用?C++ FileSystem::DestroyFileObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileSystem
的用法示例。
在下文中一共展示了FileSystem::DestroyFileObject方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Connect
bool TransportHandlerFile::Connect(TransportInfo* pTInfo, bool& bStateComplete)
{
using namespace EA::WebKit;
bool bReturnValue = false;
FileInfo* pFileInfo = (FileInfo*)pTInfo->mTransportHandlerData;
EAW_ASSERT(pFileInfo != NULL);
if(pFileInfo)
{
FileSystem* pFS = GetFileSystem();
EAW_ASSERT(pFS != NULL); // This should be non-NULL because InitJob found it to be non-NULL.
pFileInfo->mFileObject = pFS->CreateFileObject();
if(pFileInfo->mFileObject != FileSystem::kFileObjectInvalid)
{
pFileInfo->mbRead = (pTInfo->mHttpRequestType == EA::WebKit::kHttpRequestTypeGET);
int openFlags = pFileInfo->mbRead ? FileSystem::kRead : FileSystem::kWrite;
if(pFS->OpenFile(pFileInfo->mFileObject, GetFixedString(pTInfo->mPath)->c_str(), openFlags))
bReturnValue = true;
else
{
pFS->DestroyFileObject(pFileInfo->mFileObject);
pFileInfo->mFileObject = FileSystem::kFileObjectInvalid;
}
}
}
bStateComplete = true;
return bReturnValue;
}
示例2: GetFileSystem
FormDataStream::~FormDataStream()
{
using namespace EA::WebKit;
if (m_file != FileSystem::kFileObjectInvalid)
{
FileSystem* pFS = GetFileSystem();
EAW_ASSERT(pFS != NULL);
if(pFS)
{
pFS->CloseFile(m_file);
pFS->DestroyFileObject(m_file);
}
}
}
示例3: Disconnect
bool TransportHandlerFile::Disconnect(TransportInfo* pTInfo, bool& bStateComplete)
{
using namespace EA::WebKit;
FileInfo* pFileInfo = (FileInfo*)pTInfo->mTransportHandlerData;
EAW_ASSERT(pFileInfo != NULL);
if(pFileInfo->mFileObject != FileSystem::kFileObjectInvalid)
{
FileSystem* pFS = GetFileSystem();
EAW_ASSERT(pFS != NULL);
if(pFS)
{
pFS->CloseFile(pFileInfo->mFileObject);
pFS->DestroyFileObject(pFileInfo->mFileObject);
pFileInfo->mFileObject = FileSystem::kFileObjectInvalid;
}
}
bStateComplete = true;
return true;
}