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] !=
'\\')
103 if(path[
n - 1] ==
'/' || path[
n - 1] ==
'\\')
169 while(path[i] !=
'\0')
172 if(path[i] ==
'/' || path[i] ==
'\\')
176 while(path[i] ==
'/' || path[i] ==
'\\')
183 path[k++] = path[i++];
199 if(path[i] ==
'/' || path[i] ==
'\0')
202 if((i - j) == 1 &&
osStrncmp(path + j,
".", 1) == 0)
211 else if(path[i] ==
'/' && path[i + 1] ==
'\0')
225 else if((i - j) == 2 &&
osStrncmp(path + j,
"..", 2) == 0)
240 for(j = 1; j < k; j++)
242 if(path[k - j - 1] ==
'/')
249 if(
osStrncmp(path + k - j,
"..", 2) == 0)
260 if(k == 0 && path[0] ==
'/')
264 else if(path[i] ==
'/')
272 if(k == 3 &&
osStrncmp(path,
"..", 2) == 0)
281 else if(path[i] ==
'\0')
286 else if(path[i] ==
'/' && path[i + 1] ==
'\0')
312 while(path[i] ==
'/')
319 }
while(path[i++] !=
'\0');
346 else if(path[
n - 1] !=
'/' && path[
n - 1] !=
'\\')
349 if(maxLen >= (
n + 1))
369 for(end = NULL; *path !=
'\0'; path++)
371 if(*path !=
'/' && *path !=
'\\')
404 while(*more ==
'/' || *more ==
'\\')
418 n2 =
MIN(n2, maxLen - n1);
422 path[n1 + n2] =
'\0';
441 while(pattern[j] !=
'\0')
444 if(pattern[j] ==
'?')
459 else if(pattern[j] ==
'*')
467 else if(
pathMatch(path + i, pattern + j + 1))
495 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.