OSDN Git Service

ファイル読込を別スレッド化
[gefu/Gefu.git] / win32.cpp
1 //#define Q_OS_WIN
2
3 #include "win32.h"
4
5 #ifdef Q_OS_WIN
6     #include <windows.h>
7 #endif
8
9 bool Win32::hasSystemAttribute(const QString &path)
10 {
11 #ifdef Q_OS_WIN
12     DWORD dwFlags = ::GetFileAttributes(path.toStdWString().c_str());
13     if (dwFlags != DWORD(-1) &&
14         (dwFlags & FILE_ATTRIBUTE_SYSTEM) == FILE_ATTRIBUTE_SYSTEM)
15     {
16         return true;
17     }
18 #else
19     Q_UNUSED(path);
20 #endif
21     return false;
22 }