|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
29 #if defined(__APPLE__)
33 #ifndef YARP_NO_DEPRECATED // Since YARP 3.4.0
47 std::string fileName(p);
49 size_t index = fileName.rfind(
'/');
50 if (index == std::string::npos) {
52 index = fileName.rfind(
'\\');
53 if (index == std::string::npos) {
60 std::string base = fileName.substr(0, index);
67 if (ignoreLevels <= 0) {
103 if (std::strlen(hostname) == 0) {
104 std::strncpy(hostname,
"no_hostname", size);
110 char hostname[HOST_NAME_MAX];
122 #if defined(__APPLE__)
123 static void* handle = 0;
124 if (!enabled && !handle) {
134 #ifndef YARP_NO_DEPRECATED // Since YARP 3.0.0
150 if (std::strlen(tmp) == 0) {
151 std::strncpy(progname,
"no_progname", size);
153 std::strncpy(progname, tmp, size);
164 # if defined(YARP_HAS_ACE)
166 # elif defined(__unix__)
174 #endif // YARP_NO_DEPRECATED
const char * getenv(const char *var)
Portable wrapper for the getenv() function.
int getpid()
Portable wrapper for the getppid() function.
int fork()
Portable wrapper for the fork() function.
#define YARP_COMPILER_ERROR(x)
Generate an error at build time on supported compilers.
void restoreAppNap(void *activityInfo)
void setEnergySavingModeState(bool enabled)
Toggle the OS energy saving feature.
void gethostname(char *hostname, size_t size)
Portable wrapper for the gethostname() function.
char * getcwd(char *buf, size_t size)
Portable wrapper for the getcwd() function.
int stat(const char *path)
Portable wrapper for the stat() function.
int rmdir(const char *p)
Portable wrapper for the rmdir() function.
int mkdir_p(const char *p, int ignoreLevels=0)
Create a directory and all parent directories needed.
void getprogname(char *progname, size_t size)
Portable wrapper for the getprogname() function.
int mkdir(const char *p)
Portable wrapper for the mkdir() function.
void setprogname(const char *progname)
Portable wrapper for the setprogname() function.
int rename(const char *oldname, const char *newname)
Portable wrapper for the rename() function.