Lines Matching defs:path

35  *	int nftw(char *path, int (*fn)(), int depth, int flags);
40 * path. It uses the generic directory reading library so it works
44 * walk down any path the crosses itself.
495 nftw(const char *path,
505 const char *savepath = path;
527 if (*path == '/')
535 while (*path) {
536 *dp = *path;
539 dp++, path++;
543 if (*path) {
609 * Get stat info on path when FTW_CHDIR is set.
613 cdstat(const char *path, struct stat *statp, struct Save *lp, int flags)
615 return (fstatat(AT_FDCWD, path, statp, flags));
619 * Get lstat info on path when FTW_CHDIR is set.
623 cdlstat(const char *path, struct stat *statp, struct Save *lp, int flags)
625 return (fstatat(AT_FDCWD, path, statp,
630 * Get stat info on path when FTW_CHDIR is not set.
633 nocdstat(const char *path, struct stat *statp, struct Save *lp, int flags)
639 /* get basename of path */
640 basepath = get_unrooted(path);
644 basepath = path;
653 * Get lstat info on path when FTW_CHDIR is not set.
656 nocdlstat(const char *path, struct stat *statp, struct Save *lp, int flags)
662 /* get basename of path */
663 basepath = get_unrooted(path);
667 basepath = path;
676 * Open path directory when FTW_CHDIR is set.
680 cdopendir(const char *path)
682 return (opendir(path));
686 * Open path directory when FTW_CHDIR is not set.
689 nocdopendir(const char *path)
695 if (((fdd = opendir(path)) == NULL) && (errno == ENAMETOOLONG)) {
696 if ((dirp = strdup(path)) == NULL) {
726 * return pointer basename of path, which may contain trailing slashes
731 get_unrooted(const char *path)
735 if (!path || !*path)
738 ptr = path + strlen(path);
739 /* find last char in path before any trailing slashes */
740 while (ptr != path && *--ptr == '/')
743 if (ptr == path) /* all slashes */
746 while (ptr != path)