Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Gorshenin <y@maps.me>2015-10-15 14:06:01 +0300
committerYuri Gorshenin <y@maps.me>2015-10-15 18:47:20 +0300
commit5b580e4d7aa054719e991dc90c76e0eee8399ec8 (patch)
treee1c361b4489062e587828a62570f70e7c724d02b /platform/platform_win.cpp
parent0f9a4fea92130a76d51ea9b296714c5c2c447659 (diff)
Review fixes.
Diffstat (limited to 'platform/platform_win.cpp')
-rw-r--r--platform/platform_win.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/platform/platform_win.cpp b/platform/platform_win.cpp
index b69ea1ff89..1bbe9d5df0 100644
--- a/platform/platform_win.cpp
+++ b/platform/platform_win.cpp
@@ -10,8 +10,9 @@
#include <direct.h>
#include <shlobj.h>
-#include <sys/types.h>
+#include <shlwapi.h>
#include <sys/stat.h>
+#include <sys/types.h>
static bool GetUserWritableDir(string & outDir)
{
@@ -155,6 +156,11 @@ Platform::TStorageStatus Platform::GetWritableStorageStatus(uint64_t neededSize)
return STORAGE_OK;
}
+bool Platform::IsDirectoryEmpty(string const & directory)
+{
+ return PathIsDirectoryEmptyA(directory.c_str());
+}
+
bool Platform::GetFileSizeByFullPath(string const & filePath, uint64_t & size)
{
HANDLE hFile = CreateFileA(filePath.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);