mirror of
https://github.com/denoland/deno.git
synced 2024-11-23 15:16:54 -05:00
24 lines
822 B
Rust
24 lines
822 B
Rust
|
// { "preopens": { "/fixture": "fixture" } }
|
||
|
|
||
|
fn main() {
|
||
|
let metadata = std::fs::symlink_metadata("/fixture/directory").unwrap();
|
||
|
assert!(metadata.file_type().is_dir());
|
||
|
|
||
|
let metadata =
|
||
|
std::fs::symlink_metadata("/fixture/symlink_to_directory").unwrap();
|
||
|
assert!(metadata.file_type().is_symlink());
|
||
|
|
||
|
let metadata = std::fs::symlink_metadata("/fixture/file").unwrap();
|
||
|
assert!(metadata.file_type().is_file());
|
||
|
|
||
|
let metadata = std::fs::symlink_metadata("/fixture/symlink_to_file").unwrap();
|
||
|
assert!(metadata.file_type().is_symlink());
|
||
|
|
||
|
let metadata = std::fs::symlink_metadata("/fixture/directory/file").unwrap();
|
||
|
assert!(metadata.file_type().is_file());
|
||
|
|
||
|
let metadata =
|
||
|
std::fs::symlink_metadata("/fixture/directory/symlink_to_file").unwrap();
|
||
|
assert!(metadata.file_type().is_symlink());
|
||
|
}
|