Lines Matching defs:dir_fd
673 * int dir_fd = DEFAULT_DIR_FD;
1070 int dir_fd;
1071 if (!dir_fd_converter(o, &dir_fd))
1073 if (dir_fd != DEFAULT_DIR_FD) {
1074 argument_unavailable_error(NULL, "dir_fd");
1077 *(int *)p = dir_fd;
1102 path_and_dir_fd_invalid(const char *function_name, path_t *path, int dir_fd)
1104 if (!path->wide && (dir_fd != DEFAULT_DIR_FD)
1110 "%s: can't specify dir_fd without matching path",
1118 dir_fd_and_fd_invalid(const char *function_name, int dir_fd, int fd)
1120 if ((dir_fd != DEFAULT_DIR_FD) && (fd != -1)) {
1122 "%s: can't specify both dir_fd and fd",
1143 dir_fd_and_follow_symlinks_invalid(const char *function_name, int dir_fd,
1146 if ((dir_fd != DEFAULT_DIR_FD) && (!follow_symlinks)) {
1148 "%s: cannot use dir_fd and follow_symlinks together",
2037 int dir_fd, int follow_symlinks)
2047 if (path_and_dir_fd_invalid("stat", path, dir_fd) ||
2048 dir_fd_and_fd_invalid("stat", dir_fd, path->fd) ||
2063 if ((!follow_symlinks) && (dir_fd == DEFAULT_DIR_FD))
2068 if ((dir_fd != DEFAULT_DIR_FD) || !follow_symlinks)
2069 result = fstatat(dir_fd, path->narrow, &st,
2394 dir_fd : dir_fd(requires='fstatat') = None
2406 dir_fd and follow_symlinks may not be implemented
2410 It's an error to use dir_fd or follow_symlinks when specifying path as
2416 os_stat_impl(PyObject *module, path_t *path, int dir_fd, int follow_symlinks)
2419 return posix_do_stat("stat", path, dir_fd, follow_symlinks);
2430 dir_fd : dir_fd(requires='fstatat') = None
2439 os_lstat_impl(PyObject *module, path_t *path, int dir_fd)
2443 return posix_do_stat("lstat", path, dir_fd, follow_symlinks);
2459 dir_fddir_fd(requires='faccessat') = None
2476 dir_fd, effective_ids, and follow_symlinks may not be implemented
2487 os_access_impl(PyObject *module, path_t *path, int mode, int dir_fd,
2530 if ((dir_fd != DEFAULT_DIR_FD) ||
2538 result = faccessat(dir_fd, path->narrow, mode, flags);
2690 dir_fd : dir_fd(requires='fchmodat') = None
2702 It is an error to use dir_fd or follow_symlinks when specifying path as
2704 dir_fd and follow_symlinks may not be implemented on your platform.
2710 os_chmod_impl(PyObject *module, path_t *path, int mode, int dir_fd,
2754 if ((!follow_symlinks) && (dir_fd == DEFAULT_DIR_FD))
2759 if ((dir_fd != DEFAULT_DIR_FD) || !follow_symlinks) {
2767 * support dir_fd and follow_symlinks=False. (Hopefully.)
2770 result = fchmodat(dir_fd, path->narrow, mode,
2789 if (dir_fd != DEFAULT_DIR_FD)
2791 dir_fd, follow_symlinks);
3039 dir_fd : dir_fd(requires='fchownat') = None
3054 If dir_fd is not None, it should be a file descriptor open to a directory,
3059 It is an error to use dir_fd or follow_symlinks when specifying path as
3061 dir_fd and follow_symlinks may not be implemented on your platform.
3068 int dir_fd, int follow_symlinks)
3077 if (dir_fd_and_fd_invalid("chown", dir_fd, path->fd) ||
3101 dir_fd == DEFAULT_DIR_FD))
3106 if ((dir_fd != DEFAULT_DIR_FD) || (!follow_symlinks))
3107 result = fchownat(dir_fd, path->narrow, uid, gid,
3309 src_dir_fd : dir_fd = None
3310 dst_dir_fd : dir_fd = None
3815 dir_fd : dir_fd(requires='mkdirat') = None
3817 # "mkdir(path, mode=0o777, *, dir_fd=None)\n\n\
3821 If dir_fd is not None, it should be a file descriptor open to a directory,
3823 dir_fd may not be implemented on your platform.
3830 os_mkdir_impl(PyObject *module, path_t *path, int mode, int dir_fd)
3845 if (dir_fd != DEFAULT_DIR_FD)
3846 result = mkdirat(dir_fd, path->narrow, mode);
4017 src_dir_fd : dir_fd = None
4018 dst_dir_fd : dir_fd = None
4064 dir_fd: dir_fd(requires='unlinkat') = None
4068 If dir_fd is not None, it should be a file descriptor open to a directory,
4070 dir_fd may not be implemented on your platform.
4075 os_rmdir_impl(PyObject *module, path_t *path, int dir_fd)
4086 if (dir_fd != DEFAULT_DIR_FD)
4087 result = unlinkat(dir_fd, path->narrow, AT_REMOVEDIR);
4211 dir_fd: dir_fd(requires='unlinkat')=None
4215 If dir_fd is not None, it should be a file descriptor open to a directory,
4217 dir_fd may not be implemented on your platform.
4223 os_unlink_impl(PyObject *module, path_t *path, int dir_fd)
4235 if (dir_fd != DEFAULT_DIR_FD)
4236 result = unlinkat(dir_fd, path->narrow, 0);
4256 If dir_fd is not None, it should be a file descriptor open to a directory,
4258 dir_fd may not be implemented on your platform.
4263 os_remove_impl(PyObject *module, path_t *path, int dir_fd)
4266 return os_unlink_impl(module, path, dir_fd);
4414 utime_dir_fd(utime_t *ut, int dir_fd, const char *path, int follow_symlinks)
4419 return utimensat(dir_fd, path, time, flags);
4424 * we only allow !follow_symlinks and dir_fd together
4428 return futimesat(dir_fd, path, time);
4527 dir_fd: dir_fd(requires='futimensat') = None
4530 # "utime(path, times=None, *[, ns], dir_fd=None, follow_symlinks=True)\n\
4546 If dir_fd is not None, it should be a file descriptor open to a directory,
4551 It is an error to use dir_fd or follow_symlinks when specifying path
4553 dir_fd and follow_symlinks may not be available on your platform.
4560 int dir_fd, int follow_symlinks)
4627 if (path_and_dir_fd_invalid("utime", path, dir_fd) ||
4628 dir_fd_and_fd_invalid("utime", dir_fd, path->fd) ||
4633 if ((dir_fd != DEFAULT_DIR_FD) && (!follow_symlinks)) {
4635 "utime: cannot use dir_fd and follow_symlinks "
4672 if ((!follow_symlinks) && (dir_fd == DEFAULT_DIR_FD))
4678 if ((dir_fd != DEFAULT_DIR_FD) || (!follow_symlinks))
4679 result = utime_dir_fd(&utime, dir_fd, path->narrow, follow_symlinks);
6989 "readlink(path, *, dir_fd=None) -> path\n\n\
6992 If dir_fd is not None, it should be a file descriptor open to a directory,\n\
6994 dir_fd may not be implemented on your platform.\n\
7005 int dir_fd = DEFAULT_DIR_FD;
7009 static char *keywords[] = {"path", "dir_fd", NULL};
7015 READLINKAT_DIR_FD_CONVERTER, &dir_fd))
7020 if (dir_fd != DEFAULT_DIR_FD)
7021 length = readlinkat(dir_fd, path.narrow, buffer, MAXPATHLEN);
7053 int dir_fd;
7060 static char *keywords[] = {"path", "dir_fd", NULL};
7064 dir_fd_unavailable, &dir_fd
7211 dir_fd: dir_fd(requires='symlinkat')=None
7213 # "symlink(src, dst, target_is_directory=False, *, dir_fd=None)\n\n\
7222 If dir_fd is not None, it should be a file descriptor open to a directory,
7224 dir_fd may not be implemented on your platform.
7231 int target_is_directory, int dir_fd)
7274 if (dir_fd != DEFAULT_DIR_FD)
7275 result = symlinkat(src->narrow, dir_fd, dst->narrow);
7534 dir_fd: dir_fd(requires='openat') = None
7536 # "open(path, flags, mode=0o777, *, dir_fd=None)\n\n\
7540 If dir_fd is not None, it should be a file descriptor open to a directory,
7542 dir_fd may not be implemented on your platform.
7547 os_open_impl(PyObject *module, path_t *path, int flags, int mode, int dir_fd)
7572 if (dir_fd != DEFAULT_DIR_FD)
7573 fd = openat(dir_fd, path->narrow, flags, mode);
8489 dir_fd: dir_fd(requires='mkfifoat')=None
8493 If dir_fd is not None, it should be a file descriptor open to a directory,
8495 dir_fd may not be implemented on your platform.
8500 os_mkfifo_impl(PyObject *module, path_t *path, int mode, int dir_fd)
8509 if (dir_fd != DEFAULT_DIR_FD)
8510 result = mkfifoat(dir_fd, path->narrow, mode);
8533 dir_fd: dir_fd(requires='mknodat')=None
8544 If dir_fd is not None, it should be a file descriptor open to a directory,
8546 dir_fd may not be implemented on your platform.
8552 int dir_fd)
8561 if (dir_fd != DEFAULT_DIR_FD)
8562 result = mknodat(dir_fd, path->narrow, mode, device);