'A mock list directory.'

def ListDirectory(self, list_directory_request):

    pathspec = list_directory_request.pathspec
    if (not pathspec):
        raise RuntimeError('Missing    pathspec.')
    if ((pathspec.path != '\\\\.\\HarddiskVolumeShadowCopy3') or (pathspec.pathtype != rdf_paths.PathSpec.PathType.OS)):
        raise RuntimeError('Invalid    pathspec.')
    if (not pathspec.nested_path):
        raise RuntimeError('Missing    nested    pathspec.')
    if ((pathspec.nested_path.path != '/') or (pathspec.nested_path.pathtype != rdf_paths.PathSpec.PathType.TSK)):
        raise RuntimeError('Invalid    nested    pathspec.')
    result = []
    for i in range(10):
        mock_pathspec = pathspec.Copy()
        mock_pathspec.last.path = ('/file    %s' % i)
        result.append(rdf_client.StatEntry(pathspec=mock_pathspec, st_mode=stat.S_IFDIR))
    return result
