Sha256: 02ba203872a6ddd20c8e65471d77d544d85d6dfb4fd572b3f7782d73be01aafe
Contents?: true
Size: 682 Bytes
Versions: 31
Compression:
Stored size: 682 Bytes
Contents
#![warn(rust_2018_idioms)] #![cfg(all(feature = "full", not(target_os = "wasi")))] // WASI does not support all fs operations #![cfg(windows)] use tempfile::tempdir; use tokio::fs; #[tokio::test] async fn symlink_file_windows() { let dir = tempdir().unwrap(); let source_path = dir.path().join("foo.txt"); let dest_path = dir.path().join("bar.txt"); fs::write(&source_path, b"Hello File!").await.unwrap(); fs::symlink_file(&source_path, &dest_path).await.unwrap(); fs::write(&source_path, b"new data!").await.unwrap(); let from = fs::read(&source_path).await.unwrap(); let to = fs::read(&dest_path).await.unwrap(); assert_eq!(from, to); }
Version data entries
31 entries across 31 versions & 1 rubygems