/// This creates a temporary directory with the given UNIX permissions.
/// Note:  TempDirs are deleted when they go out of scope.  The deletion
/// may not be immediate.  You will have undefined behaviour if you
/// operate outside the specification.
This creates a temporary directory with the given UNIX permissions.
Note:  TempDirs are deleted when they go out of scope.  The deletion
may not be immediate.  You will have undefined behaviour if you
operate outside the specification.
This creates a temporary directory with the given UNIX permissions . Note : TempDirs are deleted when they go out of scope . The deletion may not be immediate . You will have undefined behaviour if you operate outside the specification .
pub fn mk_temp_dir_with_permissions(mode: u32) -> TempDir {
    let dir = tempdir_deleted_at_end_of_scope().unwrap();
    let metadata =
        fs::metadata(dir.path()).expect("Could not get the permissions of the new test directory.");
    let mut permissions = metadata.permissions();
    permissions.set_mode(mode);
    fs::set_permissions(dir.path(), permissions)
        .expect("Could not set the permissions of the new test directory.");
    dir
}
pub fn mk_temp_dir_with_permissions ( mode : u32 ) -> TempDir { let dir = tempdir_deleted_at_end_of_scope ( ) . unwrap ( ) ; let metadata = fs :: metadata ( dir . path ( ) ) . expect ( " " ) ; let mut permissions = metadata . permissions ( ) ; permissions . set_mode ( mode ) ; fs :: set_permissions ( dir . path ( ) , permissions ) . expect ( " " ) ; dir }
This creates a temporary directory with the given UNIX permissions.
This creates a temporary directory with the given UNIX permissions .
mode
u32