Create And Delete Files And Directories
Demonstrate how to create files or directories from a path object
Create
Create files and directories
import scalax.file.Path
val path: Path = Path ("/tmp/file")
// create file but fail if the file already exists.
// an exception may be thrown
path.createFile()
// force create a file will fail if it is a directory which
// contain children
path.createFile(failIfExists=false)
// TODO createFile with attributes
// create a directory at the path location
path.createDirectory()
path.createDirectory(failIfExists=false)