title: How to convert Scala Directory (File, Path) to Java java.io.File
body: <p>I have an instance of <code>scala.reflect.io.Directory</code> and I would like to use it as the working directory of a <code>Process</code>:</p>
  
  <pre><code>val workDirectory : scala.reflect.io.Directory = ???
  Process("myCommand", workDirectory)
  </code></pre>
  
  <p><code>Process</code> requires a Java <code>java.io.File</code> argument, however. How do I convert the scala <code>Directory</code> to a Java <code>File</code>? I can see methods like <code>toFile</code>, <code>toAbsolute</code>, ... but none of them returns what I need (the same applies for Scala <code>File</code> or <code>Path</code>). </p>