// // BloggenValidator.m // Bloggen // // Created by Davis Remmel on 2/17/14. // Copyright (c) 2014 Davis Remmel. All rights reserved. // #import "BloggenValidator.h" @implementation BloggenValidator + (BOOL)validateTheme:(NSURL *)themeURL { // Add logic to make sure the theme has all the necessary files: // index.html, archive.html, post.html, and feed.atom. NSArray *requiredFiles = @[ @"index.html", @"archive.html", @"post.html", @"feed.atom" ]; NSFileManager *fileManager = [[NSFileManager alloc] init]; for (NSString *fileName in requiredFiles) { NSString *requiredFilePath = [[themeURL URLByAppendingPathComponent:fileName] path]; if (![fileManager fileExistsAtPath:requiredFilePath]) { return NO; } } return YES; } @end