def remote_listDirectory(self, directoryName): """List the directory called path. Raises L{flumotion.common.errors.NotDirectoryError} if directoryName is not a directory. @param directoryName: the name of the directory to list @type directoryName: string @returns: the directory @rtype: deferred that will fire an object implementing L{IDirectory} """ return listDirectory(directoryName)
def testListDirectory(self): try: d = listDirectory(self.path) except AssertionError: # missing backends return def done(directory): self.failUnless(IDirectory.providedBy(directory)) self.assertEqual(directory.filename, os.path.basename(self.path)) self.assertEqual(directory.getPath(), self.path) self.failUnless(directory.iconNames) d.addCallback(done) return d
def remote_listDirectory(self, directoryName): """List the directory called path @returns: the directory @rtype: deferred that will fire an object implementing L{IDirectory} """ return listDirectory(directoryName)