      */
     public func write(data: Data) throws {
         do {
-            try data.write(to: path.fileURL)
+            try data.write(to: URL(fileURLWithPath: path))
         } catch {
             throw Error.writeFailed
         }

}

private extension String {
    var fileURL: URL {
        return URL(string: "file://" + self)!
    }
    
    var pathComponents: [String] {
        return components(separatedBy: "/")
    }

     */
    public func read() throws -> Data {
        do {
            return try Data(contentsOf: URL(fileURLWithPath: path))
        } catch {
            throw Error.readFailed
        }
