Lines Matching defs:path

35  *	int _xftw(path, fn, depth)  char *path; int (*fn)(); int depth;
37 * Given a path name, _xftw starts from the file given by that path
43 * The first contains the path name of the object, the second
121 _xftw(int ver, const char *path,
129 rc = fwalk(path, fn, depth, &var);
137 fwalk(const char *path, int (*fn)(const char *, const struct stat *, int),
157 if (nocdstat(path, &sb, vp, 0) < 0) {
160 if ((nocdstat(path, &sb, vp, AT_SYMLINK_NOFOLLOW) != -1) &&
163 return (*fn)(path, &sb, FTW_NS);
168 return (errno == EACCES? (*fn)(path, &sb, FTW_NS): -1);
176 return ((*fn)(path, &sb, FTW_F));
183 dirp = nocdopendir(path, vp);
192 return (errno == EACCES? (*fn)(path, &sb, FTW_DNR): -1);
195 rc = (*fn)(path, &sb, FTW_D);
204 * just create a path name and call self to check it out.
214 n = strlen(path);
221 (void) strcpy(subpath, path);
225 /* Append component name to the working path */
256 dirp = nocdopendir(path, vp);
270 * Open a directory with an arbitrarily long path name. If the original
275 nocdopendir(const char *path, struct Var *vp)
281 fdd = opendir(path);
284 * Traverse the path using openat() to get the fd for
287 if ((dirp = strdup(path)) == NULL) {
317 * Stat a file with an arbitrarily long path name. If we aren't doing a
322 nocdstat(const char *path, struct stat *statp, struct Var *vp, int sym)
330 rc = fstatat(AT_FDCWD, path, statp, sym);
333 /* Traverse path using openat() to get fd for fstatat(). */
334 if ((dirp = strdup(path)) == NULL) {
344 unrootp = get_unrooted(path);
370 * Return pointer basename of path. This routine doesn't remove
374 get_unrooted(const char *path)
378 if (!path || !*path)
381 ptr = path + strlen(path);
382 /* find last char in path before any trailing slashes */
383 while (ptr != path && *--ptr == '/')
386 if (ptr == path) /* all slashes */
389 while (ptr != path)