Reputation: 2691
In my Scala code I want to create a folder "c:/temp" and then create a file "file.txt" within that folder. I don't want to have to use "c:/temp/file.txt". So, I want to use the relative path of the file to create it within that folder.
Imagine how a human creates a folder and then a file? He creates a folder; goes in the folder, and then creates the file inside that folder. That's what I want to do.
=====
Added the following to make this more clear: Let's say I created the folder and I have a File object called myFolder that represents that folder. What I want is to be able to do something like myFolder.createFile("file.txt").
Upvotes: 0
Views: 1746