MCPcopy Create free account
hub / github.com/CloudPolis/webdav-client-python / mkdir

Method mkdir

webdav/client.py:305–326  ·  view source on GitHub ↗
(self, remote_path)

Source from the content-addressed store, hash-verified

303 raise NotConnection(self.webdav.hostname)
304
305 def mkdir(self, remote_path):
306
307 try:
308 directory_urn = Urn(remote_path, directory=True)
309
310 if not self.check(directory_urn.parent()):
311 raise RemoteParentNotFound(directory_urn.path())
312
313 url = {'hostname': self.webdav.hostname, 'root': self.webdav.root, 'path': directory_urn.quote()}
314 options = {
315 'URL': "{hostname}{root}{path}".format(**url),
316 'CUSTOMREQUEST': Client.requests['mkdir'],
317 'HTTPHEADER': self.get_header('mkdir')
318 }
319
320 request = self.Request(options=options)
321
322 request.perform()
323 request.close()
324
325 except pycurl.error:
326 raise NotConnection(self.webdav.hostname)
327
328 def download_to(self, buff, remote_path):
329

Callers 3

upload_directoryMethod · 0.95
pushMethod · 0.95
pullMethod · 0.80

Calls 9

checkMethod · 0.95
parentMethod · 0.95
pathMethod · 0.95
quoteMethod · 0.95
get_headerMethod · 0.95
RequestMethod · 0.95
UrnClass · 0.90
NotConnectionClass · 0.85

Tested by

no test coverage detected