@@ -22,8 +22,8 @@ Directory sort:
22
22
23
23
Example:
24
24
``` sh
25
- curl http://localhost/ghfs/
26
- curl http://localhost/ghfs/? sort=/T
25
+ curl ' http://localhost/ghfs/'
26
+ curl ' http://localhost/ghfs/?sort=/T'
27
27
```
28
28
29
29
# Get JSON data of specified path
@@ -33,7 +33,7 @@ GET <path>?json[&sort=key]
33
33
34
34
Example:
35
35
``` sh
36
- curl http://localhost/ghfs/? json
36
+ curl ' http://localhost/ghfs/?json'
37
37
```
38
38
39
39
# Render page for downloading
@@ -47,7 +47,7 @@ It's convenient for tools like "wget" to download files recursively.
47
47
48
48
Example:
49
49
``` shell
50
- wget --recursive -nc -nH -np http://localhost/dir/? download
50
+ wget --recursive -nc -nH -np ' http://localhost/dir/?download'
51
51
```
52
52
53
53
# Download a file
@@ -58,7 +58,7 @@ GET <path/to/file>?download
58
58
59
59
Example:
60
60
``` sh
61
- curl http://localhost/ghfs/file? download
61
+ curl ' http://localhost/ghfs/file?download'
62
62
```
63
63
64
64
# Get contents of specified path as archive file
@@ -74,7 +74,7 @@ POST <path>?zip
74
74
75
75
Example:
76
76
``` sh
77
- curl http://localhost/tmp/? zip > tmp.zip
77
+ curl ' http://localhost/tmp/?zip' > tmp.zip
78
78
```
79
79
80
80
To archive specific sub items under current directory, pass ` name ` params:
@@ -92,7 +92,7 @@ name=<path1>&name=<path2>&...name=<pathN>
92
92
93
93
Example:
94
94
``` sh
95
- curl -X POST -d ' name=subdir1&name=subdir2/subdir21&name=file1&name=subdir3/file31' http://localhost/tmp/? zip > tmp.zip
95
+ curl -X POST -d ' name=subdir1&name=subdir2/subdir21&name=file1&name=subdir3/file31' ' http://localhost/tmp/?zip' > tmp.zip
96
96
```
97
97
98
98
# Create directories in specific path
@@ -108,7 +108,7 @@ name=<dir1path>&name=<dir2path>&...name=<dirNpath>
108
108
109
109
Example:
110
110
``` sh
111
- curl -X POST -d ' name=dir1&name=dir2&name=foo/bar/baz' http://localhost/tmp/? mkdir
111
+ curl -X POST -d ' name=dir1&name=dir2&name=foo/bar/baz' ' http://localhost/tmp/?mkdir'
112
112
```
113
113
114
114
# Upload files to specific path
@@ -122,20 +122,20 @@ POST <path>?upload[&json]
122
122
123
123
Example:
124
124
``` sh
125
- curl -F ' file=@file1.txt' -F ' file=@file2.txt;filename=renamed.txt' http://localhost/tmp/? upload
125
+ curl -F ' file=@file1.txt' -F ' file=@file2.txt;filename=renamed.txt' ' http://localhost/tmp/?upload'
126
126
```
127
127
128
128
If "mkdir" is also enabled, it is possible to upload file to a specific path relative to current URL path,
129
129
using form name ` dirfile ` instead of ` file ` :
130
130
``` sh
131
- curl -F ' dirfile=@file1.txt;filename=subdir/childdir/filename.txt' http://localhost/tmp/? upload
131
+ curl -F ' dirfile=@file1.txt;filename=subdir/childdir/filename.txt' ' http://localhost/tmp/?upload'
132
132
# file is now available at http://localhost/tmp/subdir/childdir/filename.txt
133
133
```
134
134
135
135
Another form name ` innerdirfile ` is similar to ` dirfile ` , but strip first level of upload directory.
136
136
It is convenient to upload contents of a directory:
137
137
``` sh
138
- curl -F ' innerdirfile=@file1.txt;filename=subdir/childdir/filename.txt' http://localhost/tmp/? upload
138
+ curl -F ' innerdirfile=@file1.txt;filename=subdir/childdir/filename.txt' ' http://localhost/tmp/?upload'
139
139
# file is now available at http://localhost/tmp/childdir/filename.txt
140
140
```
141
141
@@ -153,5 +153,5 @@ name=<dir1>&name=<dir2>&...name=<dirN>
153
153
154
154
Example:
155
155
``` sh
156
- curl -X POST -d ' name=dir1&name=dir2&name=dir3' http://localhost/tmp/? delete
156
+ curl -X POST -d ' name=dir1&name=dir2&name=dir3' ' http://localhost/tmp/?delete'
157
157
```
0 commit comments