Skip to content

Commit 80e8c6f

Browse files
authored
Update README.md
1 parent 8de7941 commit 80e8c6f

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

README.md

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ options = {
8989
client = wc.Client(options)
9090
```
9191

92-
Other options for pycurl
92+
Or you want to limit the speed or turn on verbose mode:
9393

9494
```python
9595
options = {
@@ -98,6 +98,7 @@ options = {
9898
'send_speed' : 3000000,
9999
'verbose' : True
100100
}
101+
client = wc.Client(options)
101102
```
102103

103104
recv_speed: rate limit data download speed in Bytes per second. Defaults to unlimited speed.
@@ -107,88 +108,88 @@ verbose: set verbose mode on/off. By default verbose mode is off.
107108
**Synchronous methods**
108109

109110
```python
110-
//Checking existence of the resource
111+
// Checking existence of the resource
111112

112113
client.check("dir1/file1")
113114
client.check("dir1")
114115
```
115116

116117
```python
117-
//Get information about the resource
118+
// Get information about the resource
118119

119120
client.info("dir1/file1")
120121
client.info("dir1/")
121122
```
122123

123124
```python
124-
//Check free space
125+
// Check free space
125126

126127
free_size = client.free()
127128
```
128129

129130
```python
130-
//Get a list of resources
131+
// Get a list of resources
131132

132133
files1 = client.list()
133134
files2 = client.list("dir1")
134135
```
135136

136137
```python
137-
//Create directory
138+
// Create directory
138139

139140
client.mkdir("dir1/dir2")
140141
```
141142

142143
```python
143-
//Delete resource
144+
// Delete resource
144145

145146
client.clean("dir1/dir2")
146147
```
147148

148149
```python
149-
//Copy resource
150+
// Copy resource
150151

151152
client.copy(remote_path_from="dir1/file1", remote_path_to="dir2/file1")
152153
client.copy(remote_path_from="dir2", remote_path_to="dir3")
153154
```
154155

155156
```python
156-
//Move resource
157+
// Move resource
157158

158159
client.move(remote_path_from="dir1/file1", remote_path_to="dir2/file1")
159160
client.move(remote_path_from="dir2", remote_path_to="dir3")
160161
```
161162

162163
```python
163-
//Move resource
164+
// Move resource
164165

165166
client.download_sync(remote_path="dir1/file1", local_path="~/Downloads/file1")
166167
client.download_sync(remote_path="dir1/dir2/", local_path="~/Downloads/dir2/")
167168
```
168169

169170
```python
170-
//Unload resource
171+
// Unload resource
171172

172173
client.upload_sync(remote_path="dir1/file1", local_path="~/Documents/file1")
173174
client.upload_sync(remote_path="dir1/dir2/", local_path="~/Documents/dir2/")
174175
```
175176

176177
```python
177-
//Publish the resource
178+
// Publish the resource
178179

179180
link = client.publish("dir1/file1")
180181
link = client.publish("dir2")
181182
```
182183

183184
```python
184-
//Unpublish resource
185+
// Unpublish resource
185186

186187
client.unpublish("dir1/file1")
187188
client.unpublish("dir2")
188189
```
189190

190191
```python
191-
//Exception handling
192+
// Exception handling
192193

193194
from webdav.client import WebDavException
194195
try:
@@ -198,21 +199,21 @@ except WebDavException as exception:
198199
```
199200

200201
```python
201-
//Get the missing files
202+
// Get the missing files
202203

203204
client.pull(remote_directory='dir1', local_directory='~/Documents/dir1')
204205
```
205206

206207
```python
207-
//Send missing files
208+
// Send missing files
208209

209210
client.push(remote_directory='dir1', local_directory='~/Documents/dir1')
210211
```
211212

212213
**Asynchronous methods**
213214

214215
```python
215-
//Load resource
216+
// Load resource
216217

217218
kwargs = {
218219
'remote_path': "dir1/file1",
@@ -230,7 +231,7 @@ client.download_async(**kwargs)
230231
```
231232

232233
```python
233-
//Unload resource
234+
// Unload resource
234235

235236
kwargs = {
236237
'remote_path': "dir1/file1",
@@ -253,13 +254,13 @@ Resource API
253254
Resource API using the concept of OOP that enables cloud-level resources.
254255

255256
```python
256-
//Get a resource
257+
// Get a resource
257258

258259
res1 = client.resource("dir1/file1")
259260
```
260261

261262
```python
262-
//Work with the resource
263+
// Work with the resource
263264

264265
res1.rename("file2")
265266
res1.move("dir1/file2")

0 commit comments

Comments
 (0)