#include <stdbool.h>
#include <stddef.h>
#include "rcutils/macros.h"
#include "rcutils/visibility_control.h"
Go to the source code of this file.
bool rcutils_get_cwd |
( |
char * |
buffer, |
|
|
size_t |
max_length |
|
) |
| |
Return current working directory.
- Parameters
-
[in] | buffer | Allocated string to store current directory path to |
[in] | max_length | maximum length to be stored in buffer |
- Returns
- bool True if success False if buffer is NULL False on failure
bool rcutils_is_directory |
( |
const char * |
abs_path | ) |
|
Check if the provided path points to a directory.
- Parameters
-
[in] | abs_path | Absolute path to check. |
- Returns
- bool True if directory False if abs_path is NULL False on failure
bool rcutils_is_file |
( |
const char * |
abs_path | ) |
|
Check if the provided path points to a file.
- Parameters
-
[in] | abs_path | Absolute path to check. |
- Returns
- bool True if file False if abs_path is NULL False on failure
bool rcutils_exists |
( |
const char * |
abs_path | ) |
|
Check if the provided path points to an existing file/folder.
- Parameters
-
[in] | abs_path | Absolute path to check. |
- Returns
- bool True if the path exists False if abs_path is NULL False on failure
bool rcutils_is_readable |
( |
const char * |
abs_path | ) |
|
Check if the provided path points to a file/folder readable by current user.
- Parameters
-
[in] | abs_path | Absolute path to check. |
- Returns
- bool True if the file is readable False if abs_path is NULL False on failure
bool rcutils_is_writable |
( |
const char * |
abs_path | ) |
|
Check if the provided path points to a file/folder writable by current user.
- Parameters
-
[in] | abs_path | Absolute path to check. |
- Returns
- bool True if the file is writable False if abs_path is NULL False on failure
bool rcutils_is_readable_and_writable |
( |
const char * |
abs_path | ) |
|
Check if the provided path points to a file/folder both readable and writable by current user.
- Parameters
-
[in] | abs_path | Absolute path to check. |
- Returns
- bool True if the file is redable and writable False otherwise False if abs_path is NULL False on failure
const char* rcutils_join_path |
( |
const char * |
left_hand_path, |
|
|
const char * |
right_hand_path |
|
) |
| |
Concatenate path adding the right delimiter according to the platform.
- Parameters
-
[in] | left_hand_path | |
[in] | right_hand_path | |
- Returns
- const char * concatenated path on success NULL on invalid arguments NULL on failure