@@ -2896,7 +2896,7 @@ Remove a file.
2896
2896
Flush a given path's data to disk.
2897
2897
2898
2898
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.
2900
2900
2901
2901
+ Parameters
2902
2902
+ arg (string, required) - Path to flush. Default: '/'.
@@ -3705,7 +3705,7 @@ Note: all paths must be absolute.
3705
3705
3706
3706
+ Parameters
3707
3707
+ 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.
3709
3709
+ flush (boolean, optional) - Flush target and ancestors after write. Default: true. Alias: f.
3710
3710
3711
3711
+ Request Without Arguments
@@ -3932,6 +3932,81 @@ Note: all paths must be absolute.
3932
3932
```
3933
3933
```
3934
3934
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
+
3935
4010
## stat [GET /files/stat{?arg}{&flush}]
3936
4011
Display file status.
3937
4012
0 commit comments