Java and Scala File and Directory Handling

Scala – How to open and read files in Scala

How to write to file in Java – BufferedWriter

Java File: Reading and Writing Files in Java

org.apache.commons.io.FileUtils Example

org.apache.commons.io.FileUtils (Api Docs)

4 Ways to Copy File in Java

File and directory Copying

Java File IO – How to test whether a file or directory exists

How to create directories in Java

How do I get all files with certain extensions in a directory including subdirectories?

How to set File Permissions in Java Easily using Java 7 PosixFilePermission

java.nio.file.Files.setPosixFilePermissions

Instantiating Object from String at Runtime in Scala

import scala.reflect.runtime.{universe => ru}
import scala.reflect.runtime.universe._

case class Person(name: String)

object ReflectionPoc {
	def main(args: Array[String]) { 
		val m = ru.runtimeMirror(getClass.getClassLoader)
		val p_clz = Class.forName("Person")
		val personClassSymbol = m.classSymbol(p_clz)
		val p = m.reflectClass(personClassSymbol)
		println(p)
		val p_Type = personClassSymbol.toType
		val p_ctor = p_Type.declaration(ru.nme.CONSTRUCTOR).asMethod
		val p_ctorm = p.reflectConstructor(p_ctor)
		val p_obj = p_ctorm("Mike")
		println(p_obj)
		
	}
}

Links
Reflection Overview (Scala Docs)
Scala 2.10 Runtime Reflection from a Class Name (Veeb’s Brain Dump)
Symbols, Trees, and Types (Scala Docs)
Environment, Universes, and Mirrors (Scala Docs)
How to get constructor argument names using Scala-Macros

Kale-Carrot Vegetable Quinoa

Ingredients:
Quinoa
Vegetable broth
Carrots
Broccoli
Kale
Mushrooms
Leek
Garlic
Rosemary
Thyme
Salt + Pepper
Cayenne pepper
Olive Oil

Recipe:
Pre-heat oven to 375F degrees.
Rinse and chop herbs, garlic, onion, carrot, kale, broccoli, mushrooms and set aside.
Setup a baking pan coated with tin-foil.
Mix carrots with oil, salt+pepper then put on pan and bake for about 10 minutes.
Mix kale and rest of vegetables. all herbs, salt+pepper, and cayenne then add on top of carrots already in oven. Bake for about 10 minutes or until kale have a little bit of crispiness to its top edges.
In soup pot simmer quinoa using vegetable slightly diluted with water until tender.
Mix veggies with quinoa and enjoy!

Tips:
Best with organic fresh herbs, no dried stuff.