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 Yershov <yershov@corp.mail.ru>2015-03-11 17:14:16 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:38:47 +0300
commit1ab260d29a389dda2daebc258ae29f97c19bd6c8 (patch)
treecb57d069de6196267600250ae8ed73b6f9de1667 /platform/platform.hpp
parent3ef96267251ccd107108624e44f0322c7ee7e4e2 (diff)
Fix quiet fail while create file or directory
Diffstat (limited to 'platform/platform.hpp')
-rw-r--r--platform/platform.hpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/platform/platform.hpp b/platform/platform.hpp
index 82208d1402..a66a9036e9 100644
--- a/platform/platform.hpp
+++ b/platform/platform.hpp
@@ -18,6 +18,13 @@ DECLARE_EXCEPTION(NotImplementedException, RootException);
class Platform
{
+public:
+ enum EError
+ {
+ ERR_OK = 0,
+ ERR_UNKNOWN = 1
+ };
+
protected:
/// Usually read-only directory for application resources
string m_resourcesDir;
@@ -60,7 +67,8 @@ public:
string WritableDir() const { return m_writableDir; }
/// @return full path to file in user's writable directory
string WritablePathForFile(string const & file) const { return WritableDir() + file; }
- /// @return full path to indexes directory for country file. Creates directory if it's not exists.
+ /// @return full path to indexes directory for country file.
+ /// Creates directory if it's not exists. Throw Writer::CreateDirException if can't create.
string WritablePathForCountryIndexes(string const & mwmName) const;
/// @return generate full path to index based on mwmName and index extension
string GetIndexFileName(string const & mwmName, string const & extension) const;
@@ -69,7 +77,7 @@ public:
string ResourcesDir() const { return m_resourcesDir; }
/// Creates directory at filesystem
- void MkDir(string const & dirName) const;
+ EError MkDir(string const & dirName) const;
/// @TODO create join method for string concatenation