From 926594c53c600fd65f210806d7d6d841b02c3385 Mon Sep 17 00:00:00 2001 From: Sam Reghenzi Date: Fri, 14 Jun 2019 16:57:30 +0200 Subject: fix wrong field name in example code (denoland/deno_std#490) Original: https://github.com/denoland/deno_std/commit/3ec3a8b4f1eee8b5c6d90db6a30a6ab38afa05c8 --- fs/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/README.md b/fs/README.md index 8f4c472a8..deb0f5c1a 100644 --- a/fs/README.md +++ b/fs/README.md @@ -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 -- cgit v1.2.3