Go to the documentation of this file.
44 if(path[0] ==
'/' || path[0] ==
'\\')
64 if(path[0] ==
'/' || path[0] ==
'\\')
92 if(path[
n - 1] !=
'/' && path[
n - 1] !=
'\\')
105 if(path[
n - 1] ==
'/' || path[
n - 1] ==
'\\')
173 while(path[i] !=
'\0')
176 if(path[i] ==
'/' || path[i] ==
'\\')
180 while(path[i] ==
'/' || path[i] ==
'\\')
187 path[k++] = path[i++];
203 if(path[i] ==
'/' || path[i] ==
'\0')
206 if((i - j) == 1 &&
osStrncmp(path + j,
".", 1) == 0)
215 else if(path[i] ==
'/' && path[i + 1] ==
'\0')
231 else if((i - j) == 2 &&
osStrncmp(path + j,
"..", 2) == 0)
248 for(j = 1; j < k; j++)
250 if(path[k - j - 1] ==
'/')
259 if(
osStrncmp(path + k - j,
"..", 2) == 0)
270 if(k == 0 && path[0] ==
'/')
274 else if(path[i] ==
'/')
282 if(k == 3 &&
osStrncmp(path,
"..", 2) == 0)
291 else if(path[i] ==
'\0')
296 else if(path[i] ==
'/' && path[i + 1] ==
'\0')
324 while(path[i] ==
'/')
331 }
while(path[i++] !=
'\0');
360 else if(path[
n - 1] !=
'/' && path[
n - 1] !=
'\\')
363 if(maxLen >= (
n + 1))
387 for(end = NULL; *path !=
'\0'; path++)
389 if(*path !=
'/' && *path !=
'\\')
426 while(*more ==
'/' || *more ==
'\\')
440 n2 =
MIN(n2, maxLen - n1);
444 path[n1 + n2] =
'\0';
463 while(pattern[j] !=
'\0')
466 if(pattern[j] ==
'?')
481 else if(pattern[j] ==
'*')
489 else if(
pathMatch(path + i, pattern + j + 1))
517 if(path[i] ==
'\0' && pattern[j] ==
'\0')
Path manipulation helper functions.
bool_t pathIsRelative(const char_t *path)
Test if the path is relative.
const char_t * pathGetFilename(const char_t *path)
Extract the file name from the supplied path.
void pathCanonicalize(char_t *path)
Simplify a path.
#define osMemcpy(dest, src, length)
bool_t pathIsAbsolute(const char_t *path)
Test if the path is absolute.
bool_t pathMatch(const char_t *path, const char_t *pattern)
Check whether a file name matches the specified pattern.
void pathAddSlash(char_t *path, size_t maxLen)
Add a slash to the end of a string.
#define osStrncmp(s1, s2, length)
void pathRemoveSlash(char_t *path)
Remove the trailing slash from a given path.
void pathRemoveFilename(char_t *path)
Remove the trailing file name from the supplied path.
#define osMemmove(dest, src, length)
void pathCopy(char_t *dest, const char_t *src, size_t maxLen)
Copy a path.
void pathCombine(char_t *path, const char_t *more, size_t maxLen)
Concatenate two paths.