Gazebo Common
API Reference
5.7.0
insert_drive_file
Tutorials
library_books
Classes
toc
Namespaces
insert_drive_file
Files
launch
Gazebo Website
Index
List
Hierarchy
Members: All
Members: Functions
Members: Variables
Members: Typedefs
Members: Enumerations
Members: Enumerator
List
Members
Functions
Typedefs
Variables
Enumerations
Enumerator
src
gz-common
include
gz
common
gz/common/SystemPaths.hh
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2016 Open Source Robotics Foundation
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*
16
*/
17
#ifndef GZ_COMMON_SYSTEMPATHS_HH_
18
#define GZ_COMMON_SYSTEMPATHS_HH_
19
20
#include <functional>
21
#include <list>
22
#include <string>
23
#include <vector>
24
25
#include <gz/common/Export.hh>
26
#include <
gz/common/URI.hh
>
27
28
#include <gz/utils/ImplPtr.hh>
29
30
namespace
gz
31
{
32
namespace
common
33
{
38
class
GZ_COMMON_VISIBLE
SystemPaths
39
{
41
public
:
SystemPaths
();
42
48
public
:
std::string
LogPath
()
const
;
49
52
public
:
const
std::list<std::string>
&
PluginPaths
();
53
59
public
:
std::string
FindFileURI
(
const
std::string
&_uri)
const
;
60
68
public
:
std::string
FindFileURI
(
const
common::URI
&_uri)
const
;
69
72
public
:
void
SetPluginPathEnv
(
const
std::string
&_env);
73
81
public
:
std::string
FindFile
(
const
std::string
&_filename,
82
const
bool
_searchLocalPath =
true
,
83
const
bool
_verbose =
true
)
const
;
84
93
public
:
std::string
FindSharedLibrary
(
const
std::string
&_libName);
94
97
public
:
void
AddPluginPaths
(
const
std::string
&_path);
98
100
public
:
void
ClearPluginPaths
();
101
109
public
:
void
SetFilePathEnv
(
const
std::string
&_env);
110
117
public
:
std::string
FilePathEnv
()
const
;
118
121
public
:
const
std::list<std::string>
&
FilePaths
();
122
128
public
:
void
AddFilePaths
(
const
std::string
&_path);
129
131
public
:
void
ClearFilePaths
();
132
135
public
:
void
AddSearchPathSuffix
(
const
std::string
&_suffix);
136
146
public
:
void
AddFindFileCallback
(
147
std::function
<
std::string
(
const
std::string
&)> _cb);
148
158
public
:
void
AddFindFileURICallback
(
159
std::function
<
std::string
(
const
common::URI
&)> _cb);
160
172
public
:
static
std::string
LocateLocalFile
(
const
std::string
&_filename,
173
const
std::vector<std::string>
&_paths);
174
179
public
:
static
std::string
NormalizeDirectoryPath
(
180
const
std::string
&_path);
181
185
public
:
static
std::list<std::string>
PathsFromEnv
(
186
const
std::string
&_env);
187
190
public
:
static
char
Delimiter
();
191
193
GZ_UTILS_IMPL_PTR(dataPtr)
194
};
195
}
196
}
197
#endif