Coverage Report

Created: 2025-05-07 06:59

/rust/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.44.2/src/fs/symlink.rs
Line
Count
Source (jump to first uncovered line)
1
use crate::fs::asyncify;
2
3
use std::io;
4
use std::path::Path;
5
6
/// Creates a new symbolic link on the filesystem.
7
///
8
/// The `link` path will be a symbolic link pointing to the `original` path.
9
///
10
/// This is an async version of [`std::os::unix::fs::symlink`].
11
0
pub async fn symlink(original: impl AsRef<Path>, link: impl AsRef<Path>) -> io::Result<()> {
12
0
    let original = original.as_ref().to_owned();
13
0
    let link = link.as_ref().to_owned();
14
0
15
0
    asyncify(move || std::os::unix::fs::symlink(original, link)).await
16
0
}