@@ -89,7 +89,7 @@ options = {
8989client = 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
9595options = {
@@ -98,6 +98,7 @@ options = {
9898 ' send_speed' : 3000000 ,
9999 ' verbose' : True
100100}
101+ client = wc.Client(options)
101102```
102103
103104recv_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
112113client.check(" dir1/file1" )
113114client.check(" dir1" )
114115```
115116
116117``` python
117- // Get information about the resource
118+ // Get information about the resource
118119
119120client.info(" dir1/file1" )
120121client.info(" dir1/" )
121122```
122123
123124``` python
124- // Check free space
125+ // Check free space
125126
126127free_size = client.free()
127128```
128129
129130``` python
130- // Get a list of resources
131+ // Get a list of resources
131132
132133files1 = client.list()
133134files2 = client.list(" dir1" )
134135```
135136
136137``` python
137- // Create directory
138+ // Create directory
138139
139140client.mkdir(" dir1/dir2" )
140141```
141142
142143``` python
143- // Delete resource
144+ // Delete resource
144145
145146client.clean(" dir1/dir2" )
146147```
147148
148149``` python
149- // Copy resource
150+ // Copy resource
150151
151152client.copy(remote_path_from = " dir1/file1" , remote_path_to = " dir2/file1" )
152153client.copy(remote_path_from = " dir2" , remote_path_to = " dir3" )
153154```
154155
155156``` python
156- // Move resource
157+ // Move resource
157158
158159client.move(remote_path_from = " dir1/file1" , remote_path_to = " dir2/file1" )
159160client.move(remote_path_from = " dir2" , remote_path_to = " dir3" )
160161```
161162
162163``` python
163- // Move resource
164+ // Move resource
164165
165166client.download_sync(remote_path = " dir1/file1" , local_path = " ~/Downloads/file1" )
166167client.download_sync(remote_path = " dir1/dir2/" , local_path = " ~/Downloads/dir2/" )
167168```
168169
169170``` python
170- // Unload resource
171+ // Unload resource
171172
172173client.upload_sync(remote_path = " dir1/file1" , local_path = " ~/Documents/file1" )
173174client.upload_sync(remote_path = " dir1/dir2/" , local_path = " ~/Documents/dir2/" )
174175```
175176
176177``` python
177- // Publish the resource
178+ // Publish the resource
178179
179180link = client.publish(" dir1/file1" )
180181link = client.publish(" dir2" )
181182```
182183
183184``` python
184- // Unpublish resource
185+ // Unpublish resource
185186
186187client.unpublish(" dir1/file1" )
187188client.unpublish(" dir2" )
188189```
189190
190191``` python
191- // Exception handling
192+ // Exception handling
192193
193194from webdav.client import WebDavException
194195try :
@@ -198,21 +199,21 @@ except WebDavException as exception:
198199```
199200
200201``` python
201- // Get the missing files
202+ // Get the missing files
202203
203204client.pull(remote_directory = ' dir1' , local_directory = ' ~/Documents/dir1' )
204205```
205206
206207``` python
207- // Send missing files
208+ // Send missing files
208209
209210client.push(remote_directory = ' dir1' , local_directory = ' ~/Documents/dir1' )
210211```
211212
212213** Asynchronous methods**
213214
214215``` python
215- // Load resource
216+ // Load resource
216217
217218kwargs = {
218219 ' remote_path' : " dir1/file1" ,
@@ -230,7 +231,7 @@ client.download_async(**kwargs)
230231```
231232
232233``` python
233- // Unload resource
234+ // Unload resource
234235
235236kwargs = {
236237 ' remote_path' : " dir1/file1" ,
@@ -253,13 +254,13 @@ Resource API
253254Resource API using the concept of OOP that enables cloud-level resources.
254255
255256``` python
256- // Get a resource
257+ // Get a resource
257258
258259res1 = client.resource(" dir1/file1" )
259260```
260261
261262``` python
262- // Work with the resource
263+ // Work with the resource
263264
264265res1.rename(" file2" )
265266res1.move(" dir1/file2" )
0 commit comments