             }
 
             do {
+                try self.cleanIfNeeded()
+
                 for path in site.paths {
                     try self.write(path: path, file: site.memoizedFiles[path])
                 }


    // public var parsesFrontmatter = true

    // public var shouldCleanBeforeBuild = true

    public var ignoreFilters = [IgnoreFilter]()


            try sourcePath.copy(destinationPath)
        }
    }

    func cleanIfNeeded() throws {
        if shouldCleanBeforeBuild {
            try absoluteDestination.delete()
        }
    }
}
