Path manipulation helper functions. More...
Go to the source code of this file.
Functions | |
bool_t | pathIsAbsolute (const char_t *path) |
Test if the path is absolute. More... | |
bool_t | pathIsRelative (const char_t *path) |
Test if the path is relative. More... | |
const char_t * | pathGetFilename (const char_t *path) |
Extract the file name from the supplied path. More... | |
void | pathRemoveFilename (char_t *path) |
Remove the trailing file name from the supplied path. More... | |
void | pathCopy (char_t *dest, const char_t *src, size_t maxLen) |
Copy a path. More... | |
void | pathCanonicalize (char_t *path) |
Simplify a path. More... | |
void | pathAddSlash (char_t *path, size_t maxLen) |
Add a slash to the end of a string. More... | |
void | pathRemoveSlash (char_t *path) |
Remove the trailing slash from a given path. More... | |
void | pathCombine (char_t *path, const char_t *more, size_t maxLen) |
Concatenate two paths. More... | |
bool_t | pathMatch (const char_t *path, const char_t *pattern) |
Check whether a file name matches the specified pattern. More... | |
Detailed Description
Path manipulation helper functions.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.4.4
Definition in file path.c.
Function Documentation
◆ pathAddSlash()
void pathAddSlash | ( | char_t * | path, |
size_t | maxLen | ||
) |
◆ pathCanonicalize()
void pathCanonicalize | ( | char_t * | path | ) |
◆ pathCombine()
◆ pathCopy()
◆ pathGetFilename()
◆ pathIsAbsolute()
◆ pathIsRelative()
◆ pathMatch()
Check whether a file name matches the specified pattern.
- Parameters
-
[in] path NULL-terminated string that contains the path to be matched [in] pattern NULL-terminated string that contains the pattern for which to search. The pattern may contain wildcard characters
- Returns
- TRUE if the path matches the specified pattern, else FALSE
◆ pathRemoveFilename()
void pathRemoveFilename | ( | char_t * | path | ) |