mirror of
https://github.com/denoland/deno.git
synced 2024-11-29 16:30:56 -05:00
fix wrong field name in example code (denoland/deno_std#490)
Original: 3ec3a8b4f1
This commit is contained in:
parent
0ed3046a9a
commit
926594c53c
1 changed files with 4 additions and 4 deletions
|
@ -161,17 +161,17 @@ Iterate all files in a directory recursively.
|
||||||
import { walk, walkSync } from "https://deno.land/std/fs/mod.ts";
|
import { walk, walkSync } from "https://deno.land/std/fs/mod.ts";
|
||||||
|
|
||||||
for (const fileInfo of walkSync()) {
|
for (const fileInfo of walkSync()) {
|
||||||
console.log(fileInfo.path);
|
console.log(fileInfo.filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Async
|
// Async
|
||||||
async function printFilesPath() {
|
async function printFilesNames() {
|
||||||
for await (const fileInfo of walk()) {
|
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
|
### writeJson
|
||||||
|
|
Loading…
Reference in a new issue