Esempio n. 1
0
    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)
Esempio n. 2
0
    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)
Esempio n. 3
0
    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
Esempio n. 4
0
    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
Esempio n. 5
0
 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)