After playing with it a little I reached the following:
- filename is the file path just like when creating java.nio.File objects using the File(String pathname) constructor
- If no such file exists, it creates one.
- It works even if a pre-existing file is already there, did not get around to testing if it overwrites it or if it writes at beginning/end