本文整理汇总了C++中CPUTOSServices::DoesDirectoryExist方法的典型用法代码示例。如果您正苦于以下问题:C++ CPUTOSServices::DoesDirectoryExist方法的具体用法?C++ CPUTOSServices::DoesDirectoryExist怎么用?C++ CPUTOSServices::DoesDirectoryExist使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPUTOSServices
的用法示例。
在下文中一共展示了CPUTOSServices::DoesDirectoryExist方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
// Set where CPUT will look for it's button images, fonts, etc
//-----------------------------------------------------------------------------
CPUTResult CPUT_DX11::SetCPUTResourceDirectory(const cString ResourceDirectory)
{
// check to see if the specified directory is valid
CPUTResult result = CPUT_SUCCESS;
// resolve the directory to a full path
cString fullPath;
CPUTOSServices *pServices = CPUTOSServices::GetOSServices();
result = pServices->ResolveAbsolutePathAndFilename(ResourceDirectory, &fullPath);
if(CPUTFAILED(result))
{
return result;
}
// check existence of directory
result = pServices->DoesDirectoryExist(fullPath);
if(CPUTFAILED(result))
{
return result;
}
// set the resource directory (absolute path)
mResourceDirectory = fullPath;
// tell the gui system where to look for it's resources
// todo: do we want to force a flush/reload of all resources (i.e. change control graphics)
result = CPUTGuiControllerDX11::GetController()->SetResourceDirectory(ResourceDirectory);
return result;
}
示例2: SetResourceDirectory
// sets the resource directory to use when loading GUI resources
//-----------------------------------------------------------------------------
CPUTResult CPUTGuiController::SetResourceDirectory(const cString ResourceDirectory)
{
// check to see if the specified directory is valid
CPUTResult result = CPUT_SUCCESS;
// resolve the directory to a full path
cString FullPath;
CPUTOSServices *pServices = CPUTOSServices::GetOSServices();
result = pServices->ResolveAbsolutePathAndFilename(ResourceDirectory, &FullPath);
if(CPUTFAILED(result))
{
return result;
}
// check existence of directory
result = pServices->DoesDirectoryExist(FullPath);
if(CPUTFAILED(result))
{
return result;
}
// set the resource directory (absolute path)
mResourceDirectory = FullPath;
return result;
}