You can't do that. Java.nio.Files was introduced in Java 7, we still support Java 6.

The canonical way to remove a file is just to "val f = new java.io.File("/tmp/plop"); if(f.delete) "ok" else { check what goes wrong }"