cap-primitives 0.9.0

Capability-oriented primitives
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use posish::fs::renameat;
use std::{fs, io, path::Path};

/// *Unsandboxed* function similar to `rename`, but which does not perform sandboxing.
pub(crate) fn rename_unchecked(
    old_start: &fs::File,
    old_path: &Path,
    new_start: &fs::File,
    new_path: &Path,
) -> io::Result<()> {
    renameat(old_start, old_path, new_start, new_path)
}