Webserver+3d print

Dependents:   Nucleo

Embed: (wiki syntax)

« Back to documentation index

path.h File Reference

path.h File Reference

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.
bool_t pathIsRelative (const char_t *path)
 Test if the path is relative.
const char_t * pathFindFileName (const char_t *path)
 Search a path for a file name.
void pathCanonicalize (char_t *path)
 Simplify a path.
void pathAddSlash (char_t *path, size_t maxLen)
 Add a slash to the end of a string.
void pathRemoveSlash (char_t *path)
 Remove the trailing slash from a given path.
void pathCombine (char_t *path, const char_t *more, size_t maxLen)
 Concatenate two paths.
bool_t pathMatch (const char_t *path, const char_t *pattern)
 Check whether a file name matches the specified pattern.

Detailed Description

Path manipulation helper functions.

License

Copyright (C) 2010-2017 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.

Author:
Oryx Embedded SARL (www.oryx-embedded.com)
Version:
1.7.6

Definition in file path.h.


Function Documentation

void pathAddSlash ( char_t *  path,
size_t  maxLen 
)

Add a slash to the end of a string.

Parameters:
[in,out]pathNULL-terminated string that represents the path
[in]maxLenMaximum pathname length

Definition at line 272 of file path.c.

void pathCanonicalize ( char_t *  path )

Simplify a path.

Parameters:
[in]pathNULL-terminated string containing the path to be canonicalized

Definition at line 110 of file path.c.

void pathCombine ( char_t *  path,
const char_t *  more,
size_t  maxLen 
)

Concatenate two paths.

Parameters:
[in,out]pathNULL-terminated string containing the first path
[in]moreNULL-terminated string containing the second path
[in]maxLenMaximum pathname length

Definition at line 329 of file path.c.

const char_t* pathFindFileName ( const char_t *  path )

Search a path for a file name.

Parameters:
[in]pathNULL-terminated string that contains the path to search
Returns:
Pointer to the file name

Definition at line 71 of file path.c.

bool_t pathIsAbsolute ( const char_t *  path )

Test if the path is absolute.

Parameters:
[in]pathNULL-terminated string that contains the path
Returns:
TRUE is the path is absolute, else FALSE

Definition at line 39 of file path.c.

bool_t pathIsRelative ( const char_t *  path )

Test if the path is relative.

Parameters:
[in]pathNULL-terminated string that contains the path
Returns:
TRUE is the path is relative, else FALSE

Definition at line 55 of file path.c.

bool_t pathMatch ( const char_t *  path,
const char_t *  pattern 
)

Check whether a file name matches the specified pattern.

Parameters:
[in]pathNULL-terminated string that contains the path to be matched
[in]patternNULL-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

Definition at line 367 of file path.c.

void pathRemoveSlash ( char_t *  path )

Remove the trailing slash from a given path.

Parameters:
[in,out]pathNULL-terminated string that contains the path

Definition at line 300 of file path.c.