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:
authorSergey Magidovich <mgsergio@mapswithme.com>2017-07-03 13:03:51 +0300
committerYuri Gorshenin <mipt.vi002@gmail.com>2017-07-05 13:32:16 +0300
commit684e2ce0b9803a99eec2c05e1d92a5db3f060c07 (patch)
tree61dbd90b7cc411ee3279c6f3428eb2890e76d7d4 /platform
parent7d8853ea7c98f08a84f0bec04d9aab4e07c674e1 (diff)
[OPENLR] Cut trafficMode from desktop app. Move it to a subproject.
Diffstat (limited to 'platform')
-rw-r--r--platform/platform.cpp9
-rw-r--r--platform/platform.hpp1
2 files changed, 10 insertions, 0 deletions
diff --git a/platform/platform.cpp b/platform/platform.cpp
index 6904fd4013..1746f3fd91 100644
--- a/platform/platform.cpp
+++ b/platform/platform.cpp
@@ -178,6 +178,15 @@ void Platform::GetFilesByType(string const & directory, unsigned typeMask,
}
}
+// static
+bool Platform::IsDirectory(string const & directory)
+{
+ EFileType fileType;
+ if (GetFileType(directory, fileType) != ERR_OK)
+ return false;
+ return fileType == FILE_TYPE_DIRECTORY;
+}
+
string Platform::DeviceName() const
{
return OMIM_OS_NAME;
diff --git a/platform/platform.hpp b/platform/platform.hpp
index d79201a10c..78fe9d76a1 100644
--- a/platform/platform.hpp
+++ b/platform/platform.hpp
@@ -165,6 +165,7 @@ public:
TFilesWithType & outFiles);
static bool IsDirectoryEmpty(string const & directory);
+ static bool IsDirectory(string const & directory);
static EError GetFileType(string const & path, EFileType & type);