three-d-asset 0.10.0

Load/save functionality for 3d applications.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//!
//! Functionality for saving assets. Only available on desktop at the moment.
//!

use super::*;

///
/// Save the assets as files.
///
pub fn save(raw_assets: &RawAssets) -> crate::Result<()> {
    use std::io::prelude::*;
    for (path, bytes) in raw_assets.iter() {
        let mut file = std::fs::File::create(path)?;
        file.write_all(bytes)?;
    }
    Ok(())
}