From 23b11a7509915b8c02b9329a78f2df22fe2eac5f Mon Sep 17 00:00:00 2001 From: Alan CHUNG Date: Mon, 25 Mar 2024 16:36:15 +0800 Subject: [PATCH] 106_files.zig format --- exercises/106_files.zig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/exercises/106_files.zig b/exercises/106_files.zig index 450ff96..ffa0f86 100644 --- a/exercises/106_files.zig +++ b/exercises/106_files.zig @@ -8,13 +8,13 @@ // The File System provide a hierarchical structure for storing files // by organizing files into directories, which hold files and other directories, // thus creating a tree structure for navigating. -// +// // Fortunately, zig standard library provide a simple api for interacting // with the file system, see the detail documentation here // // https://ziglang.org/documentation/master/std/#std.fs // -// In this exercise, we'll try to +// In this exercise, we'll try to // - create a new directory // - open a file in the directory // - write to the file. @@ -67,14 +67,14 @@ pub fn main() !void { // 2. print the content of the file in the console with command // >> cat ./output/zigling.txt // -// +// // More on Creating files -// +// // notice in: // ... try output_dir.createFile("zigling.txt", .{}); // ^^^ // we passed this anonymous struct to the function call -// +// // this is the struct `CreateFlag` with default fields // { // read: bool = false, @@ -84,7 +84,7 @@ pub fn main() !void { // lock_nonblocking: bool = false, // mode: Mode = default_mode // } -// +// // Question: // - what should you do if you want to also read the file after opening it? // - go to documentation of the struct `std.fs.Dir` here