Create Paths

Demonstrate various ways of creating Path objects

Explicit Creation

    import scalax.file.{Path, FileSystem}
    // first use default param to indicate defaultFileSystem
    val path1: Path = Path ("/tmp/file1")

    // include windows examples for completeness
    val path2: Path = Path ("file://c:/tmp/file2")
    val path3: Path = Path ("file://c:\\tmp\\file3")

    //now explicitly state the filesystem
    val path4: Path = Path ("/tmp/file4")(FileSystem.default)

    // or declare an implicit val so it can be reused (this is bot really
    // required since the default paramter is the default filesystem but
    // it illustrates how another filesystem can be used
    implicit val fs = FileSystem.default
    // fs will now be used to create the path
    val path5: Path = Path ("/tmp/file5")

    // a filesystem can also be used to create Paths
    val path6: Path = fs ("/tmp/file6")