当前位置: 首页>>代码示例>>C++>>正文


C++ CPUTOSServices::DoesDirectoryExist方法代码示例

本文整理汇总了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;
}
开发者ID:galek,项目名称:SoftOcclude,代码行数:32,代码来源:CPUT_DX11.cpp

示例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;
}
开发者ID:GameTechDev,项目名称:CloudsGPUPro6,代码行数:28,代码来源:CPUTGuiController.cpp


注:本文中的CPUTOSServices::DoesDirectoryExist方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。