All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.norbitltd.spoiwo.utils.FileUtils.scala Maven / Gradle / Ivy

There is a newer version: 1.8.0
Show newest version
package com.norbitltd.spoiwo.utils

import java.io.{File, PrintWriter}

object FileUtils {

  def write(fileName: String, content: String): Unit = {
    val file = new File(fileName)
    val writer = new PrintWriter(file)

    try {
      writer.write(content)
      writer.flush()
    } finally {
      writer.close()
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy