blob: 448efd8e7a55626287cc9b65f2ee1db8525e2879 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/*
* Copyright (c) 2013 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Base/Path.h>
#include <Swiften/Base/Platform.h>
#include <Swiften/Base/String.h>
using namespace Swift;
boost::filesystem::path Swift::stringToPath(const std::string& path) {
#ifdef SWIFTEN_PLATFORM_WINDOWS
return boost::filesystem::path(convertStringToWString(path));
#else
return boost::filesystem::path(path);
#endif
}
std::string Swift::pathToString(const boost::filesystem::path& path) {
#ifdef SWIFTEN_PLATFORM_WINDOWS
return convertWStringToString(path.native());
#else
return path.native();
#endif
}
|