diff options
author | Valentin Popov <valentin@popov.link> | 2024-07-19 15:37:58 +0300 |
---|---|---|
committer | Valentin Popov <valentin@popov.link> | 2024-07-19 15:37:58 +0300 |
commit | a990de90fe41456a23e58bd087d2f107d321f3a1 (patch) | |
tree | 15afc392522a9e85dc3332235e311b7d39352ea9 /vendor/rustix/src/fs/cwd.rs | |
parent | 3d48cd3f81164bbfc1a755dc1d4a9a02f98c8ddd (diff) | |
download | fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.tar.xz fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.zip |
Deleted vendor folder
Diffstat (limited to 'vendor/rustix/src/fs/cwd.rs')
-rw-r--r-- | vendor/rustix/src/fs/cwd.rs | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/vendor/rustix/src/fs/cwd.rs b/vendor/rustix/src/fs/cwd.rs deleted file mode 100644 index e66360e..0000000 --- a/vendor/rustix/src/fs/cwd.rs +++ /dev/null @@ -1,39 +0,0 @@ -//! The `cwd` function, representing the current working directory. -//! -//! # Safety -//! -//! This file uses `AT_FDCWD`, which is a raw file descriptor, but which is -//! always valid. - -#![allow(unsafe_code)] - -use crate::backend; -use backend::c; -use backend::fd::{BorrowedFd, RawFd}; - -/// `AT_FDCWD`—A handle representing the current working directory. -/// -/// This is a file descriptor which refers to the process current directory -/// which can be used as the directory argument in `*at` functions such as -/// [`openat`]. -/// -/// # References -/// - [POSIX] -/// -/// [`openat`]: crate::fs::openat -/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/fcntl.h.html -// SAFETY: `AT_FDCWD` is a reserved value that is never dynamically -// allocated, so it'll remain valid for the duration of `'static`. -#[doc(alias = "AT_FDCWD")] -pub const CWD: BorrowedFd<'static> = - unsafe { BorrowedFd::<'static>::borrow_raw(c::AT_FDCWD as RawFd) }; - -/// Return the value of [`CWD`]. -#[deprecated(note = "Use `CWD` in place of `cwd()`.")] -pub const fn cwd() -> BorrowedFd<'static> { - let at_fdcwd = c::AT_FDCWD as RawFd; - - // SAFETY: `AT_FDCWD` is a reserved value that is never dynamically - // allocated, so it'll remain valid for the duration of `'static`. - unsafe { BorrowedFd::<'static>::borrow_raw(at_fdcwd) } -} |