SMBProtocol.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:ysrc 作者: myDreamShadow 项目源码 文件源码
def createDirectory(self, service_name, path):
        """
        Creates a new directory *path* on the *service_name*.

        :param string/unicode service_name: Contains the name of the shared folder.
        :param string/unicode path: The path of the new folder (relative to) the shared folder.
                                    If the path contains non-English characters, an unicode string must be used to pass in the path.
        :param integer/float timeout: Number of seconds that pysmb will wait before raising *SMBTimeout* via the returned *Deferred* instance's *errback* method.
        :return: A *twisted.internet.defer.Deferred* instance. The callback function will be called with the *path* parameter.
        """
        if not self.instance:
            raise NotConnectedError('Not connected to server')

        d = defer.Deferred()
        self.instance._createDirectory(service_name, path, d.callback, d.errback)
        return d
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号