Lines Matching refs:dir_fd
1383 int dir_fd; in dir_fd_unavailable() local
1384 if (!dir_fd_converter(o, &dir_fd)) in dir_fd_unavailable()
1386 if (dir_fd != DEFAULT_DIR_FD) { in dir_fd_unavailable()
1390 *(int *)p = dir_fd; in dir_fd_unavailable()
1415 path_and_dir_fd_invalid(const char *function_name, path_t *path, int dir_fd) in path_and_dir_fd_invalid() argument
1417 if (!path->wide && (dir_fd != DEFAULT_DIR_FD) in path_and_dir_fd_invalid()
1431 dir_fd_and_fd_invalid(const char *function_name, int dir_fd, int fd) in dir_fd_and_fd_invalid() argument
1433 if ((dir_fd != DEFAULT_DIR_FD) && (fd != -1)) { in dir_fd_and_fd_invalid()
1456 dir_fd_and_follow_symlinks_invalid(const char *function_name, int dir_fd, in dir_fd_and_follow_symlinks_invalid() argument
1459 if ((dir_fd != DEFAULT_DIR_FD) && (!follow_symlinks)) { in dir_fd_and_follow_symlinks_invalid()
2499 int dir_fd, int follow_symlinks) in posix_do_stat() argument
2513 if (path_and_dir_fd_invalid("stat", path, dir_fd) || in posix_do_stat()
2514 dir_fd_and_fd_invalid("stat", dir_fd, path->fd) || in posix_do_stat()
2529 if ((!follow_symlinks) && (dir_fd == DEFAULT_DIR_FD)) in posix_do_stat()
2534 if ((dir_fd != DEFAULT_DIR_FD) || !follow_symlinks) { in posix_do_stat()
2536 result = fstatat(dir_fd, path->narrow, &st, in posix_do_stat()
2885 os_stat_impl(PyObject *module, path_t *path, int dir_fd, int follow_symlinks) in os_stat_impl() argument
2888 return posix_do_stat(module, "stat", path, dir_fd, follow_symlinks); in os_stat_impl()
2908 os_lstat_impl(PyObject *module, path_t *path, int dir_fd) in os_lstat_impl() argument
2912 return posix_do_stat(module, "lstat", path, dir_fd, follow_symlinks); in os_lstat_impl()
2956 os_access_impl(PyObject *module, path_t *path, int mode, int dir_fd, in os_access_impl() argument
3003 if ((dir_fd != DEFAULT_DIR_FD) || in os_access_impl()
3013 result = faccessat(dir_fd, path->narrow, mode, flags); in os_access_impl()
3025 if (dir_fd != DEFAULT_DIR_FD) { in os_access_impl()
3225 os_chmod_impl(PyObject *module, path_t *path, int mode, int dir_fd, in os_chmod_impl() argument
3246 dir_fd == DEFAULT_DIR_FD ? -1 : dir_fd) < 0) { in os_chmod_impl()
3275 if ((!follow_symlinks) && (dir_fd == DEFAULT_DIR_FD)) in os_chmod_impl()
3280 if ((dir_fd != DEFAULT_DIR_FD) || !follow_symlinks) { in os_chmod_impl()
3292 result = fchmodat(dir_fd, path->narrow, mode, in os_chmod_impl()
3317 if (dir_fd != DEFAULT_DIR_FD) { in os_chmod_impl()
3324 if (dir_fd != DEFAULT_DIR_FD) in os_chmod_impl()
3326 dir_fd, follow_symlinks); in os_chmod_impl()
3618 int dir_fd, int follow_symlinks) in os_chown_impl() argument
3631 if (dir_fd_and_fd_invalid("chown", dir_fd, path->fd) || in os_chown_impl()
3636 dir_fd == DEFAULT_DIR_FD ? -1 : dir_fd) < 0) { in os_chown_impl()
3647 if ((!follow_symlinks) && (dir_fd == DEFAULT_DIR_FD)) in os_chown_impl()
3652 if ((dir_fd != DEFAULT_DIR_FD) || (!follow_symlinks)) { in os_chown_impl()
3654 result = fchownat(dir_fd, path->narrow, uid, gid, in os_chown_impl()
4487 os_mkdir_impl(PyObject *module, path_t *path, int mode, int dir_fd) in os_mkdir_impl() argument
4496 dir_fd == DEFAULT_DIR_FD ? -1 : dir_fd) < 0) { in os_mkdir_impl()
4510 if (dir_fd != DEFAULT_DIR_FD) { in os_mkdir_impl()
4512 result = mkdirat(dir_fd, path->narrow, mode); in os_mkdir_impl()
4775 os_rmdir_impl(PyObject *module, path_t *path, int dir_fd) in os_rmdir_impl() argument
4784 dir_fd == DEFAULT_DIR_FD ? -1 : dir_fd) < 0) { in os_rmdir_impl()
4794 if (dir_fd != DEFAULT_DIR_FD) { in os_rmdir_impl()
4796 result = unlinkat(dir_fd, path->narrow, AT_REMOVEDIR); in os_rmdir_impl()
4953 os_unlink_impl(PyObject *module, path_t *path, int dir_fd) in os_unlink_impl() argument
4962 dir_fd == DEFAULT_DIR_FD ? -1 : dir_fd) < 0) { in os_unlink_impl()
4973 if (dir_fd != DEFAULT_DIR_FD) { in os_unlink_impl()
4976 result = unlinkat(dir_fd, path->narrow, 0); in os_unlink_impl()
5013 os_remove_impl(PyObject *module, path_t *path, int dir_fd) in os_remove_impl() argument
5016 return os_unlink_impl(module, path, dir_fd); in os_remove_impl()
5162 utime_dir_fd(utime_t *ut, int dir_fd, const char *path, int follow_symlinks) in utime_dir_fd() argument
5168 return utimensat(dir_fd, path, time, flags); in utime_dir_fd()
5176 return utimensat(dir_fd, path, time, flags); in utime_dir_fd()
5185 return futimesat(dir_fd, path, time); in utime_dir_fd()
5366 int dir_fd, int follow_symlinks) in os_utime_impl() argument
5432 if (path_and_dir_fd_invalid("utime", path, dir_fd) || in os_utime_impl()
5433 dir_fd_and_fd_invalid("utime", dir_fd, path->fd) || in os_utime_impl()
5438 if ((dir_fd != DEFAULT_DIR_FD) && (!follow_symlinks)) { in os_utime_impl()
5447 dir_fd == DEFAULT_DIR_FD ? -1 : dir_fd) < 0) { in os_utime_impl()
5484 if ((!follow_symlinks) && (dir_fd == DEFAULT_DIR_FD)) in os_utime_impl()
5490 if ((dir_fd != DEFAULT_DIR_FD) || (!follow_symlinks)) { in os_utime_impl()
5491 result = utime_dir_fd(&utime, dir_fd, path->narrow, follow_symlinks); in os_utime_impl()
8542 os_readlink_impl(PyObject *module, path_t *path, int dir_fd) in os_readlink_impl() argument
8554 if (dir_fd != DEFAULT_DIR_FD) { in os_readlink_impl()
8556 length = readlinkat(dir_fd, path->narrow, buffer, MAXPATHLEN); in os_readlink_impl()
8756 int target_is_directory, int dir_fd) in os_symlink_impl() argument
8773 dir_fd == DEFAULT_DIR_FD ? -1 : dir_fd) < 0) { in os_symlink_impl()
8833 if (dir_fd != DEFAULT_DIR_FD) { in os_symlink_impl()
8835 result = symlinkat(src->narrow, dir_fd, dst->narrow); in os_symlink_impl()
9116 os_open_impl(PyObject *module, path_t *path, int flags, int mode, int dir_fd) in os_open_impl() argument
9148 if (dir_fd != DEFAULT_DIR_FD) { in os_open_impl()
9150 fd = openat(dir_fd, path->narrow, flags, mode); in os_open_impl()
10542 os_mkfifo_impl(PyObject *module, path_t *path, int mode, int dir_fd) in os_mkfifo_impl() argument
10551 if (dir_fd != DEFAULT_DIR_FD) in os_mkfifo_impl()
10552 result = mkfifoat(dir_fd, path->narrow, mode); in os_mkfifo_impl()
10594 int dir_fd) in os_mknod_impl() argument
10603 if (dir_fd != DEFAULT_DIR_FD) in os_mknod_impl()
10604 result = mknodat(dir_fd, path->narrow, mode, device); in os_mknod_impl()
13424 int dir_fd; member
13495 if (self->dir_fd != DEFAULT_DIR_FD) { in DirEntry_fetch_stat()
13498 result = fstatat(self->dir_fd, path, &st, in DirEntry_fetch_stat()
13943 entry->dir_fd = path->fd; in DirEntry_from_posix_info()
13947 entry->dir_fd = DEFAULT_DIR_FD; in DirEntry_from_posix_info()