コード例 #1
0
        public List<Post> GetAllPosts(RemoveChoices choices, int setRemoveUnapprovedCommentsDays = 60)
        {
            var posts = new List<Post>();
            var files = Directory.GetFiles(postsPath);
            foreach (var file in files)
                posts.Add(new Post(new PostFile(file), choices, setRemoveUnapprovedCommentsDays));

            log(0, files.Length, "Starting ..", Comment.TotalCommentsRemoved,
                Comment.TotalComments, "");

            if (choices.HasFlag(RemoveChoices.Unapproved))
                RemoveAllUnapprovedComments(posts);

            return posts;
        }