You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updates to the latest ipfs release. Some extra build config was
needed because it uses optional chaining.
This is supported out of the box by the version of acorn used by
webpack 5 but vue is currently using webpack 4 so some extra config
was necessary.
Also uprades `to-buffer` - this now returns `Uint8Array`s instead
of the node `Buffer` built in, which means you can't call
`.toString(encoding)` on it any more, instead you need to use the
global js `TextDecoder` class.
return{fail: 'Your root directory is empty. Did you accidentally move the `some/stuff` directory? Remember to test whether each item is a file (`type === 0`) before moving it.'}
64
+
return{fail: 'Your root directory is empty. Did you accidentally move the `some/stuff` directory? Remember to test whether each item is a file (`type === \'file\'`) before moving it.'}
Copy file name to clipboardExpand all lines: src/tutorials/0004-mutable-file-system/08.md
+3-9Lines changed: 3 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ The method looks like this:
11
11
awaitipfs.files.mv(from, to, [options])
12
12
```
13
13
14
-
`from` is the source path (or paths) of the content you'd like to move. `to` is the destination path.
14
+
`from` is the source path (or paths) of the content you'd like to move and can be a string or an array of strings. `to` is the destination path.
15
15
16
16
If your destination path references parent directories that don't already exist, you'll need to use the `{ parents: true }` option, just as you did with `files.mkdir`.
If you're starting with an array of source paths, you can use JavaScript's [spread syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax) to expand its elements into the required format:
0 commit comments