YARP
Yet Another Robot Platform
filesystem.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 
10 #ifndef YARP_CONF_FILESYSTEM_H
11 #define YARP_CONF_FILESYSTEM_H
12 
13 namespace yarp {
14 namespace conf {
15 namespace filesystem {
16 #if (defined _WIN32)
17 # if (_MSC_VER >= 1920)
18 typedef wchar_t value_type;
19 static constexpr value_type preferred_separator = L'\\';
20 # else
21 typedef char value_type;
22 static constexpr value_type preferred_separator = '\\';
23 # endif
24 #else
25 typedef char value_type;
26 static constexpr value_type preferred_separator = '/';
27 #endif
28 
29 
30 #ifndef YARP_NO_DEPRECATED // since YARP 3.5.0
31 #include <yarp/conf/api.h> // For YARP_DEPRECATED_TYPEDEF_MSG
32 YARP_DEPRECATED_MSG("Use yarp::conf::environment::path_separator instead")
33 #if (defined _WIN32)
34 # if (_MSC_VER >= 1920)
35 static constexpr value_type path_separator = L';';
36 # else
37 static constexpr value_type path_separator = ';';
38 # endif
39 #else
40 static constexpr value_type path_separator = ':';
41 #endif
42 #endif // YARP_NO_DEPRECATED
43 
44 
45 } // namespace filesystem
46 } // namespace conf
47 } // namespace yarp
48 
49 
50 #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:2883
static constexpr value_type preferred_separator
Definition: filesystem.h:26
static constexpr value_type path_separator
Definition: filesystem.h:40
The main, catch-all namespace for YARP.
Definition: environment.h:25