 import Trevi
 
 /**
- A Middleware for compiling a specific SSP(Swift Server Page) file and send the data to client.
+ *
+ * A Middleware to compile a specific SSP(Swift Server Page) file and send the
+ * data to client.
+ *
  */
 public class SwiftServerPage: Render {
 

}

/**
 Get a compiled result of a swift codes.
 
 - Parameter path: The path where compiled swift codes will be locate.
 - Parameter code: Source codes which will be compiled.
 
 - Returns: Compiled data from the swift codes
 */
private func compileSwift(path: String, code: String, callback: ((String) -> Void)) -> String? {
    let timestamp = Int(NSDate().timeIntervalSince1970 * 1000)
    let compileFile = "/tmp/\(NSURL(fileURLWithPath: path).lastPathComponent!)\(timestamp).swift"
    

    file?.close()
    
    #if os(Linux)
        if Glibc.system("bash -c \"source ~/.profile && swiftc \(compileFile) -o /tmp/ssp\(timestamp) && chmod +x /tmp/ssp\(timestamp)\"") == 0 {
            if Glibc.system("bash -c \"/tmp/ssp\(timestamp) > /tmp/ssp\(timestamp)_print\"") == 0 {
                let file = FileSystem.ReadStream(path: "/tmp/ssp\(timestamp)_print")
                let buf = NSMutableData()
                
