diff options
-rw-r--r-- | fs/README.md | 8 |
1 files 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 |