MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / deleteDirectory

Method deleteDirectory

pager_lib/smb/SMBProtocol.py:343–358  ·  view source on GitHub ↗

Delete the empty folder at *path* on *service_name* :param string/unicode service_name: Contains the name of the shared folder. :param string/unicode path: The path of the to-be-deleted folder (relative to) the shared folder. If the path

(self, service_name, path)

Source from the content-addressed store, hash-verified

341 return d
342
343 def deleteDirectory(self, service_name, path):
344 """
345 Delete the empty folder at *path* on *service_name*
346
347 :param string/unicode service_name: Contains the name of the shared folder.
348 :param string/unicode path: The path of the to-be-deleted folder (relative to) the shared folder.
349 If the path contains non-English characters, an unicode string must be used to pass in the path.
350 :param integer/float timeout: Number of seconds that pysmb will wait before raising *SMBTimeout* via the returned *Deferred* instance's *errback* method.
351 :return: A *twisted.internet.defer.Deferred* instance. The callback function will be called with the *path* parameter.
352 """
353 if not self.instance:
354 raise NotConnectedError('Not connected to server')
355
356 d = defer.Deferred()
357 self.instance._deleteDirectory(service_name, path, d.callback, d.errback)
358 return d
359
360 def rename(self, service_name, old_path, new_path):
361 """

Callers

nothing calls this directly

Calls 1

NotConnectedErrorClass · 0.70

Tested by

no test coverage detected