@@ -773,7 +773,7 @@ pub fn mkdir<P: ?Sized + NixPath>(path: &P, mode: crate::sys::stat::Mode) -> Res
773
773
Errno :: result( res) . map( drop)
774
774
}
775
775
776
- /// Creates new fifo special file (named pipe) with path `path` and access rights `mode`.
776
+ /// Creates new FIFO special file (named pipe) with path `path` and access rights `mode`.
777
777
///
778
778
/// # Errors
779
779
///
@@ -812,7 +812,8 @@ pub fn mkfifo<P: ?Sized + NixPath>(path: &P, mode: crate::sys::stat::Mode) -> Re
812
812
Errno :: result( res) . map( drop)
813
813
}
814
814
815
- /// Creates new fifo special file (named pipe) with path `path` and access rights `mode`.
815
+ /// Creates new FIFO special file (named pipe) with access rights set to `mode`
816
+ /// in the path specified by `dirfd` and `path`.
816
817
///
817
818
/// # Examples
818
819
///
@@ -851,11 +852,12 @@ pub fn mkfifoat<Fd: std::os::fd::AsFd, P: ?Sized + NixPath>(
851
852
Errno :: result( res) . map( drop)
852
853
}
853
854
854
- /// Creates a symbolic link at `path2` which points to `path1`.
855
+ /// Creates a symbolic link to `path1` in the path specified by `dirfd` and
856
+ /// `path2`.
855
857
///
856
858
/// # Examples
857
859
///
858
- /// Assume file foo exists in the current working directory, create a symlink
860
+ /// Assume file ` foo` exists in the current working directory, create a symlink
859
861
/// to it:
860
862
///
861
863
/// ```no_run
@@ -1585,9 +1587,10 @@ impl LinkatFlags {
1585
1587
/// Creates a new hard link (directory entry) at `newpath` for the existing file
1586
1588
/// at `oldpath`. In the case of a relative `oldpath`, the path is interpreted
1587
1589
/// relative to the directory associated with file descriptor `olddirfd` instead
1588
- /// of the current working directory and similarly for `newpath` and file
1589
- /// descriptor `newdirfd`. If either `oldpath` or `newpath` is absolute, then
1590
- /// `dirfd` is ignored.
1590
+ /// of the current working directory, use [`AT_FDCWD`](crate::fcntl::AT_FDCWD)
1591
+ /// if you want to make it relative to the current working directory. Similarly
1592
+ /// for `newpath` and file descriptor `newdirfd`. If either `oldpath` or `newpath`
1593
+ /// is absolute, then `dirfd` is ignored.
1591
1594
///
1592
1595
/// In case `flag` is `AtFlags::AT_SYMLINK_FOLLOW` and `oldpath` names a symoblic
1593
1596
/// link, a new link for the target of the symbolic link is created.
@@ -1639,10 +1642,12 @@ pub enum UnlinkatFlags {
1639
1642
/// Remove a directory entry
1640
1643
///
1641
1644
/// In the case of a relative path, the directory entry to be removed is determined
1642
- /// relative to the directory associated with the file descriptor `dirfd`. In the
1643
- /// case of an absolute `path` `dirfd` is ignored. If `flag` is
1644
- /// `UnlinkatFlags::RemoveDir` then removal of the directory entry specified by
1645
- /// `dirfd` and `path` is performed.
1645
+ /// relative to the directory associated with the file descriptor `dirfd` (Use
1646
+ /// [`AT_FDCWD`](crate::fcntl::AT_FDCWD) if you want to specify the current working
1647
+ /// directory in `dirfd`). In the case of an absolute path, `dirfd` is ignored.
1648
+ ///
1649
+ /// If `flag` is `UnlinkatFlags::RemoveDir` then removal of the directory entry
1650
+ /// specified by `dirfd` and `path` is performed.
1646
1651
///
1647
1652
/// # References
1648
1653
/// See also [unlinkat(2)](https://pubs.opengroup.org/onlinepubs/9699919799/functions/unlinkat.html)
0 commit comments