summaryrefslogtreecommitdiff
path: root/std/wasi/testdata/std_fs_hard_link.rs
blob: cd068f3a8afd8882c3be1cf0f69d94f36780161a (plain)
1
2
3
4
5
6
7
8
9
10
11
// { "preopens": { "/fixture": "fixture", "/scratch": "scratch" } }

fn main() {
  assert!(
    std::fs::hard_link("/fixture/file", "/scratch/hardlink_to_file").is_ok()
  );
  assert_eq!(
    std::fs::read("/fixture/file").unwrap(),
    std::fs::read("/scratch/hardlink_to_file").unwrap()
  );
}