'Check that the directory listing is sensible.'

def CheckDirectoryListing(self, directory, test_file):

    found = False
    for f in directory.ListFiles():
        path = f.pathspec.Basename()
        if path.startswith('$'):
            continue
        self.assertGreater(f.st_mtime, 10000000)
        self.assertGreater(f.st_atime, 10000000)
        self.assertGreater(f.st_ctime, 10000000)
        if (path == test_file):
            found = True
            self.assertTrue(stat.S_ISREG(f.st_mode))
            self.assertEqual(f.st_size, 3893)
    self.assertEqual(found, True)
    self.assertRaises(IOError, directory.Read, 5)
