Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 0a5a90a

Browse files
committed
files api tests
1 parent 4308ddc commit 0a5a90a

File tree

2 files changed

+29
-4
lines changed

2 files changed

+29
-4
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,19 @@ curl 'http://localhost:5001/api/v0/object/get?arg=QmYEqnfCZp7a39Gxrgyv3qRS4MoCTG
228228

229229
##### mkdir
230230

231+
bash:
232+
`curl "http://localhost:5001/api/v0/files/mkdir?arg=%2F<folder name>`"
233+
234+
response: (it returns empty when successful)
235+
```
236+
```
237+
238+
javascript:
231239
```JavaScript
232240
ipfs.files.mkdir(<folderName>, function (err) {})
233241
```
234242

243+
<<<<<<< 4308ddc1ef008e123922a46bad67f5ad758e66fb
235244
##### cp
236245

237246
```JavaScript
@@ -279,3 +288,23 @@ ipfs.files.read(<path>, function (err, res) {
279288
```JavaScript
280289
ipfs.files.mv([<pathSrc>, <pathDst>], function (err) {})
281290
```
291+
=======
292+
response: (it returns empty when successful)
293+
```
294+
```
295+
296+
##### cp
297+
298+
##### ls
299+
300+
##### stat
301+
302+
##### rm
303+
304+
##### read
305+
306+
##### write
307+
308+
##### mv
309+
curl "http://localhost:5001/api/v0/files/mkdir?arg=%2Ffolder4"
310+
>>>>>>> files api tests

src/index.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,6 @@ function IpfsAPI (host_or_multiaddr, port, opts) {
274274
mkdir: argCommand('files/mkdir'),
275275
stat: argCommand('files/stat'),
276276
rm: function (path, opts, cb) {
277-
if (typeof (opts) === 'function') {
278-
cb = opts
279-
opts = {}
280-
}
281277
return requestAPI('files/rm', path, opts, null, cb)
282278
},
283279
read: argCommand('files/read'),

0 commit comments

Comments
 (0)