0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-30 09:08:00 -04:00

fix wrong field name in example code (denoland/deno_std#490)

Original: 3ec3a8b4f1
This commit is contained in:
Sam Reghenzi 2019-06-14 16:57:30 +02:00 committed by Ryan Dahl
parent 0ed3046a9a
commit 926594c53c

View file

@ -161,17 +161,17 @@ Iterate all files in a directory recursively.
import { walk, walkSync } from "https://deno.land/std/fs/mod.ts";
for (const fileInfo of walkSync()) {
console.log(fileInfo.path);
console.log(fileInfo.filename);
}
// Async
async function printFilesPath() {
async function printFilesNames() {
for await (const fileInfo of walk()) {
console.log(fileInfo.path);
console.log(fileInfo.filename);
}
}
printFilesPath().then(() => console.log("Done!"));
printFilesNames().then(() => console.log("Done!"));
```
### writeJson