YARP
Yet Another Robot Platform
filesystem.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 
7 #ifndef YARP_CONF_FILESYSTEM_H
8 #define YARP_CONF_FILESYSTEM_H
9 
10 namespace yarp {
11 namespace conf {
12 namespace filesystem {
13 #if (defined _WIN32)
14 # if (_MSC_VER >= 1920)
15 typedef wchar_t value_type;
16 static constexpr value_type preferred_separator = L'\\';
17 # else
18 typedef char value_type;
19 static constexpr value_type preferred_separator = '\\';
20 # endif
21 #else
22 typedef char value_type;
23 static constexpr value_type preferred_separator = '/';
24 #endif
25 
26 
27 #ifndef YARP_NO_DEPRECATED // since YARP 3.5.0
28 #include <yarp/conf/api.h> // For YARP_DEPRECATED_TYPEDEF_MSG
29 YARP_DEPRECATED_MSG("Use yarp::conf::environment::path_separator instead")
30 #if (defined _WIN32)
31 # if (_MSC_VER >= 1920)
32 static constexpr value_type path_separator = L';';
33 # else
34 static constexpr value_type path_separator = ';';
35 # endif
36 #else
37 static constexpr value_type path_separator = ':';
38 #endif
39 #endif // YARP_NO_DEPRECATED
40 
41 
42 } // namespace filesystem
43 } // namespace conf
44 } // namespace yarp
45 
46 
47 #endif // YARP_CONF_FILESYSTEM_H
#define YARP_DEPRECATED_MSG(MSG)
Expands to either the standard [[deprecated]] attribute or a compiler-specific decorator such as __at...
Definition: compiler.h:2885
static constexpr value_type preferred_separator
Definition: filesystem.h:23
static constexpr value_type path_separator
Definition: filesystem.h:37
The main, catch-all namespace for YARP.
Definition: dirs.h:16