Skip to content

Commit cfb4b1a

Browse files
authored
readFileSyncwriteFileSyncの例を修正 (#737)
1 parent 3fcea65 commit cfb4b1a

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
import { readFileSync } from "node:fs";
2-
console.log(readFileSync("sample.txt", "utf-8"));
2+
console.log(readFileSync("./sample.txt", "utf-8"));
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Hello World
1+
Hello World!
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
import { writeFileSync } from "node:fs";
2-
writeFileSync("./sample.txt", "Hello World");
2+
writeFileSync("./sample.txt", "Hello World!");

docs/3-web-servers/04-module/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ Node.js の [`fs` 標準モジュール](https://nodejs.org/api/fs.html) を用
9292

9393
```javascript title="main.mjs"
9494
import { readFileSync } from "node:fs";
95-
console.log(readFileSync("sample.txt", "utf-8"));
95+
console.log(readFileSync("./sample.txt", "utf-8"));
9696
```
9797

9898
```plain title="sample.txt"
99-
Hello World
99+
Hello World!
100100
```
101101

102102
<ViewSource
@@ -121,7 +121,7 @@ Hello World
121121

122122
```javascript title="main.mjs"
123123
import { writeFileSync } from "node:fs";
124-
writeFileSync("./sample.txt", "Hello World");
124+
writeFileSync("./sample.txt", "Hello World!");
125125
```
126126

127127
<ViewSource

0 commit comments

Comments
 (0)