Retrieve a list of shared resources on remote server. :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 callbac
(self, timeout = 30)
| 164 | # |
| 165 | |
| 166 | def listShares(self, timeout = 30): |
| 167 | """ |
| 168 | Retrieve a list of shared resources on remote server. |
| 169 | |
| 170 | :param integer/float timeout: Number of seconds that pysmb will wait before raising *SMBTimeout* via the returned *Deferred* instance's *errback* method. |
| 171 | :return: A *twisted.internet.defer.Deferred* instance. The callback function will be called with a list of :doc:`smb.base.SharedDevice<smb_SharedDevice>` instances. |
| 172 | """ |
| 173 | if not self.instance: |
| 174 | raise NotConnectedError('Not connected to server') |
| 175 | |
| 176 | d = defer.Deferred() |
| 177 | self.instance._listShares(d.callback, d.errback, timeout) |
| 178 | return d |
| 179 | |
| 180 | def listPath(self, service_name, path, |
| 181 | search = SMB_FILE_ATTRIBUTE_READONLY | SMB_FILE_ATTRIBUTE_HIDDEN | SMB_FILE_ATTRIBUTE_SYSTEM | SMB_FILE_ATTRIBUTE_DIRECTORY | SMB_FILE_ATTRIBUTE_ARCHIVE | SMB_FILE_ATTRIBUTE_INCL_NORMAL, |
nothing calls this directly
no test coverage detected