From 7523da2825e664c593a28992421f077aa68b6ea6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 14 Jan 2023 16:45:15 +0800 Subject: [PATCH] RP @geekpi https://linux.cn/article-15442-1.html --- ...0102.0 ⭐️ How to read and write files in Rust.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) rename {translated/tech => published}/20230102.0 ⭐️ How to read and write files in Rust.md (93%) diff --git a/translated/tech/20230102.0 ⭐️ How to read and write files in Rust.md b/published/20230102.0 ⭐️ How to read and write files in Rust.md similarity index 93% rename from translated/tech/20230102.0 ⭐️ How to read and write files in Rust.md rename to published/20230102.0 ⭐️ How to read and write files in Rust.md index 4a0453ae31..096f1282e4 100644 --- a/translated/tech/20230102.0 ⭐️ How to read and write files in Rust.md +++ b/published/20230102.0 ⭐️ How to read and write files in Rust.md @@ -3,13 +3,17 @@ [#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15442-1.html" 如何在 Rust 中读取和写入文件 ====== +> 跟随这个演示,学习如何在 Rust 中使用文件系统模块。 + +![][0] + 知道如何读写文件对各种用途都很有用。在 Rust 中,这项任务是通过标准库中的文件系统模块([std::fs][1])完成的。在这篇文章中,我将向你介绍如何使用这个模块。 为了演示这项任务,我准备了一些示例代码,也可以在 [GitHub][2] 上找到。 @@ -92,7 +96,7 @@ via: https://opensource.com/article/23/1/read-write-files-rust 作者:[Stephan Avenwedde][a] 选题:[lkxed][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -109,3 +113,4 @@ via: https://opensource.com/article/23/1/read-write-files-rust [9]: https://doc.rust-lang.org/std/fs/struct.OpenOptions.html# [10]: https://doc.rust-lang.org/std/fs/fn.read.html [11]: https://doc.rust-lang.org/std/io/trait.Read.html +[0]: https://opensource.com/sites/default/files/lead-images/rust_programming_crab_sea.png \ No newline at end of file