import Foundation

extension FileManager {

    var documentDirectory: URL {
        try! url(
            for: .documentDirectory,
            in: .userDomainMask,
            appropriateFor: nil, create: true)
    }
}

extension Content {

    static let mock: Content = {
        let content = Content()

        content.files = FileResource.Mock.mockData(content: content)
        content.tags = Tag.Mock.mockData(content: content)
        content.posts = Post.Mock.mockData(content: content)
        content.pages = Page.Mock.mockData(content: content)

        return content
    }()
}
