async fn create_file(path: &Path) -> Result<fs::File, IoError> {
    let file = fs::File::create(path).await?;
    let mut perms = file.metadata().await?.permissions();
    perms.set_mode(0o600);
    file.set_permissions(perms).await?;
    Ok(file)
}
// Create a file with permissions set to 0600.
Create a file with permissions set to 0600.
Create a file with permissions set to 0600 .
async fn create_file(path: &Path) -> Result<fs::File, IoError> {
    let file = fs::File::create(path).await?;
    let mut perms = file.metadata().await?.permissions();
    perms.set_mode(0o600);
    file.set_permissions(perms).await?;
    Ok(file)
}
async fn create_file ( path : & Path ) -> Result < fs :: File , IoError > { let file = fs :: File :: create ( path ) . await ? ; let mut perms = file . metadata ( ) . await ? . permissions ( ) ; perms . set_mode ( 0o600 ) ; file . set_permissions ( perms ) . await ? ; Ok ( file ) }
Create a file with permissions set to 0600.
Create a file with permissions set to 0600 .
path
&Path
path
&Path