title: Files.newOutputStream(path, CREATE_NEW, DELETE_ON_CLOSE) does not write to file
body: <p>I have the following code:</p>
  
  <pre><code>import java.io.IOException;
  import java.io.OutputStream;
  import java.nio.file.Files;
  import java.nio.file.Paths;
  
  import static java.nio.file.StandardOpenOption.CREATE_NEW;
  import static java.nio.file.StandardOpenOption.DELETE_ON_CLOSE;
  
  public class Test {
      public static void main(String[] args) throws IOException {
          try (OutputStream outputStream = Files.newOutputStream(Paths.get("test"), CREATE_NEW, DELETE_ON_CLOSE)) {
              outputStream.write(123);
              outputStream.flush();
              System.out.println("done");
          }
      }
  }
  </code></pre>
  
  <p>I put a break point on the call to <code>System.out.println</code> and inspected my working directory. There was no file called <code>test</code>. Why isn't the output stream writing to a file? </p>