Skip to content

Commit 253362b

Browse files
lonnylotzebateira
authored andcommitted
Use Regular File API in examples
The examples are using the MFS API, not the regular files API. This change switches them to the regular files API
1 parent e444681 commit 253362b

File tree

1 file changed

+2
-2
lines changed
  • src/tutorials/0005-regular-files-api

1 file changed

+2
-2
lines changed

src/tutorials/0005-regular-files-api/06.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ To iterate over all the values, we can use a `for await...of` loop:
2626
```javascript
2727
const result = []
2828

29-
for await (const resultPart of ipfs.files.ls('/catPics')) {
29+
for await (const resultPart of ipfs.ls('/catPics')) {
3030
result.push(resultPart)
3131
}
3232

@@ -39,7 +39,7 @@ To make things easier, we can use the [`it-all`](https://www.npmjs.com/package/i
3939
// the all function comes from the it-all package
4040
// and is made globally available (just like ipfs) in our code challenges
4141

42-
const result = await all(ipfs.files.ls('/catPics'))
42+
const result = await all(ipfs.ls('/catPics'))
4343
```
4444

4545
The `result` variable is now an array of objects, one for each file or directory found, structured like so:

0 commit comments

Comments
 (0)