fn is_mountpoint(file: BorrowedFd<'_>) -> bool {
    let err = renameat(&file, zstr!("../."), &file, zstr!(".")).unwrap_err();
    match err {
        io::Error::XDEV => true,  // the rename failed due to crossing a mount point
        io::Error::BUSY => false, // the rename failed normally
        _ => panic!("Unexpected error from `renameat`: {:?}", err),
    }
}
/// Check whether the given directory handle is a mount point. We use a
/// `renameat` call that would otherwise fail, but which fails with `EXDEV`
/// first if it would cross a mount point.
Check whether the given directory handle is a mount point. We use a
`renameat` call that would otherwise fail, but which fails with `EXDEV`
first if it would cross a mount point.
Check whether the given directory handle is a mount point . We use a ` renameat ` call that would otherwise fail but which fails with ` EXDEV ` first if it would cross a mount point .
fn is_mountpoint(file: BorrowedFd<'_>) -> bool {
    let err = renameat(&file, zstr!("../."), &file, zstr!(".")).unwrap_err();
    match err {
        io::Error::XDEV => true,  // the rename failed due to crossing a mount point
        io::Error::BUSY => false, // the rename failed normally
        _ => panic!("Unexpected error from `renameat`: {:?}", err),
    }
}
fn is_mountpoint ( file : BorrowedFd < ' _ > ) -> bool { let err = renameat ( & file , zstr ! ( " " ) , & file , zstr ! ( " " ) ) . unwrap_err ( ) ; match err { io :: Error :: XDEV => true , // the rename failed due to crossing a mount point io :: Error :: BUSY => false , // the rename failed normally _ => panic ! ( " " err ) , } }
Check whether the given directory handle is a mount point.
Check whether the given directory handle is a mount point .
file
BorrowedFd<'_>