本文整理汇总了C++中OovStatus::set方法的典型用法代码示例。如果您正苦于以下问题:C++ OovStatus::set方法的具体用法?C++ OovStatus::set怎么用?C++ OovStatus::set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OovStatus
的用法示例。
在下文中一共展示了OovStatus::set方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FileIsDirOnDisk
bool FileIsDirOnDisk(OovStringRef const path, OovStatus &status)
{
struct OovStat32 statval;
int statRet = OovStat32(path, &statval);
// Indicate there is an error only if the error is not ENOENT.
status.set((statRet == 0) || (errno == ENOENT), SC_File);
// Only indicate the directory exists if there was no error, and it is a directory.
return((statRet == 0) && S_ISDIR(statval.st_mode));
}
示例2: FileIsFileOnDisk
bool FileIsFileOnDisk(OovStringRef const path, OovStatus &status)
{
OovString tempPath = path;
FilePathRemovePathSep(tempPath, tempPath.size()-1);
struct OovStat32 statval;
int statRet = OovStat32(tempPath.getStr(), &statval);
// Indicate there is an error only if the error is not ENOENT.
status.set((statRet == 0) || (errno == ENOENT), SC_File);
// Only indicate the file exists if there was no error, and it is a file.
return((statRet == 0) && !S_ISDIR(statval.st_mode));
}