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

Commit e7bb6e9

Browse files
committed
Added parents default, examples
1 parent 99f430a commit e7bb6e9

File tree

1 file changed

+77
-2
lines changed

1 file changed

+77
-2
lines changed

apiary.apib

Lines changed: 77 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2896,7 +2896,7 @@ Remove a file.
28962896
Flush a given path's data to disk.
28972897

28982898
Flush a given path to disk. This is only useful when other commands
2899-
are run with the 'flush' optin set to false.
2899+
are run with the 'flush' option set to false.
29002900

29012901
+ Parameters
29022902
+ arg (string, required) - Path to flush. Default: '/'.
@@ -3705,7 +3705,7 @@ Note: all paths must be absolute.
37053705

37063706
+ Parameters
37073707
+ arg (string, required) - Path to dir to make.
3708-
+ parents (boolean, optional) - No error if existing, make parent directories as needed. Alias: p.
3708+
+ parents (boolean, optional) - No error if existing, make parent directories as needed. Default: false. Alias: p.
37093709
+ flush (boolean, optional) - Flush target and ancestors after write. Default: true. Alias: f.
37103710

37113711
+ Request Without Arguments
@@ -3932,6 +3932,81 @@ Note: all paths must be absolute.
39323932
```
39333933
```
39343934

3935+
+ Request With Embedded Argument and Without Parents Option
3936+
3937+
#### curl
3938+
3939+
curl -i "http://localhost:5001/api/v0/files/mkdir?arg=/testing/test/test"
3940+
3941+
+ Body
3942+
3943+
```
3944+
curl -i "http://localhost:5001/api/v0/files/mkdir?arg=/testing/test/test"
3945+
```
3946+
3947+
+ Response 500
3948+
3949+
+ Headers
3950+
3951+
```
3952+
Access-Control-Allow-Headers: X-Stream-Output, X-Chunked-Output
3953+
Access-Control-Expose-Headers: X-Stream-Output, X-Chunked-Output
3954+
Content-Type: application/json
3955+
Server: go-ipfs/0.4.0-dev
3956+
Trailer: X-Stream-Error
3957+
Transfer-Encoding: chunked
3958+
Date: Thu, 03 Mar 2016 16:00:58 GMT
3959+
Transfer-Encoding: chunked
3960+
```
3961+
3962+
+ Attributes (Error)
3963+
- Code: 0
3964+
- Message: "file does not exist"
3965+
3966+
3967+
+ Body
3968+
3969+
```
3970+
{
3971+
"Code": 0,
3972+
"Message": "file does not exist"
3973+
}
3974+
```
3975+
3976+
+ Request With Embedded Argument And Parents Option
3977+
3978+
#### curl
3979+
3980+
curl -i "http://localhost:5001/api/v0/files/mkdir?arg=/testing/test/test&parents"
3981+
3982+
+ Body
3983+
3984+
```
3985+
curl -i "http://localhost:5001/api/v0/files/mkdir?arg=/testing/test/test&parents"
3986+
```
3987+
3988+
+ Response 200
3989+
3990+
+ Headers
3991+
3992+
```
3993+
Access-Control-Allow-Headers: X-Stream-Output, X-Chunked-Output
3994+
Access-Control-Expose-Headers: X-Stream-Output, X-Chunked-Output
3995+
Content-Type: application/json
3996+
Server: go-ipfs/0.4.0-dev
3997+
Trailer: X-Stream-Error
3998+
Transfer-Encoding: chunked
3999+
Date: Thu, 03 Mar 2016 16:00:50 GMT
4000+
Transfer-Encoding: chunked
4001+
```
4002+
4003+
+ Attributes (string)
4004+
4005+
+ Body
4006+
4007+
```
4008+
```
4009+
39354010
## stat [GET /files/stat{?arg}{&flush}]
39364011
Display file status.
39374012

0 commit comments

Comments
 (0)