Function write_file

Source
pub async fn write_file(path: &PathBuf, data: &[u8]) -> Result<(), Error>
Expand description

把数据完整写入到文件,这会冲洗现有文件,覆盖写入。 path 文件路径。 data 需要写入的数据。