hamzaremmal/amy

View on GitHub
compiler/src/main/scala/amyc/utils/FileWriter.scala

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
package amyc.utils

import amyc.core.Context

object FileWriter {

  def apply(fileName: String)(body: => String)(using Context) =
    import java.io.{File, FileWriter}
    val fw = new FileWriter(new File(fileName))
    fw.write(body)
    fw.flush()

}