Lines Matching defs:dir
165 // flags: 1=make last dir (with mode lastmode, otherwise skips last component)
169 int mkpathat(int atfd, char *dir, mode_t lastmode, int flags)
179 if (!fstatat(atfd, dir, &buf, 0) && !S_ISDIR(buf.st_mode)) {
184 for (s = dir; ;s++) {
189 if (*s == '/' && (flags&2) && s != dir) {
200 if (mkdirat(atfd, dir, mode)) {
203 fprintf(stderr, "%s: created directory '%s'\n", toys.which->name, dir);
212 int mkpath(char *dir)
214 return mkpathat(AT_FDCWD, dir, 0, MKPATHAT_MAKE);
1072 // Return pointer to xabspath(file) if file is under dir, else 0
1073 char *fileunderdir(char *file, char *dir)
1075 char *s1 = xabspath(dir, 1), *s2 = xabspath(file, -1), *ss = s2;