2020-06-26 15:36:46 -04:00
|
|
|
// { "preopens": { "/fixture": "fixture" } }
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let metadata = std::fs::metadata("/fixture/directory").unwrap();
|
|
|
|
assert!(metadata.is_dir());
|
|
|
|
|
|
|
|
let metadata = std::fs::metadata("/fixture/symlink_to_directory").unwrap();
|
|
|
|
assert!(metadata.is_dir());
|
|
|
|
|
|
|
|
let metadata = std::fs::metadata("/fixture/file").unwrap();
|
|
|
|
assert!(metadata.is_file());
|
2020-06-27 07:53:43 -04:00
|
|
|
assert_eq!(metadata.len(), 5);
|
2020-06-26 15:36:46 -04:00
|
|
|
|
|
|
|
let metadata = std::fs::metadata("/fixture/symlink_to_file").unwrap();
|
|
|
|
assert!(metadata.is_file());
|
2020-06-27 07:53:43 -04:00
|
|
|
assert_eq!(metadata.len(), 5);
|
2020-06-26 15:36:46 -04:00
|
|
|
|
|
|
|
let metadata = std::fs::metadata("/fixture/directory/file").unwrap();
|
|
|
|
assert!(metadata.is_file());
|
2020-06-27 07:53:43 -04:00
|
|
|
assert_eq!(metadata.len(), 15);
|
2020-06-26 15:36:46 -04:00
|
|
|
|
|
|
|
let metadata =
|
|
|
|
std::fs::metadata("/fixture/directory/symlink_to_file").unwrap();
|
|
|
|
assert!(metadata.is_file());
|
2020-06-27 07:53:43 -04:00
|
|
|
assert_eq!(metadata.len(), 15);
|
2020-06-26 15:36:46 -04:00
|
|
|
}
|