title: NoSuchFileException when using java.nio.file.Files.createTempDirectory
body: <p>I have an issue when trying to create a temporary directory with java.nio.file.Files.createTempDirectory. I keep getting NoSuchFileException when trying to create the directory.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>import java.nio.file.Files;
  import java.nio.file.Path;
  import java.nio.file.Paths;
  
  public class TempFileTesting {
     private static final String ROOT = "/resources/";
  
     public static void main(String[] args) throws Exception{
        Path root = Paths.get(ROOT);
        Path tempDir = Files.createTempDirectory(root, "dir");
        Path tempFile = Files.createTempFile(tempDir, "t1", "t2");
     }
  }
  </code></pre>
  
  <p>When I do this I get a NoSuchFileException on the line calling "createTempDirectory" despite the <em>root</em> Path clearly being created successfully. The <em>resources</em> directory <strong>does exist.</strong></p>
  
  <p>The StackTrace looks like this:    </p>
  
  <pre><code>java.nio.file.NoSuchFileException: \resources\dir170003182480656885
  at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:79)
  at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
  at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
  at sun.nio.fs.WindowsFileSystemProvider.createDirectory(WindowsFileSystemProvider.java:504)
  at java.nio.file.Files.createDirectory(Files.java:674)
  at java.nio.file.TempFileHelper.create(TempFileHelper.java:136)
  at java.nio.file.TempFileHelper.createTempDirectory(TempFileHelper.java:173)
  at java.nio.file.Files.createTempDirectory(Files.java:950)
  at filetestingstuff.testers.TempFileTesting.main(TempFileTesting.java:15)
  </code></pre>
  
  <p>Full Path: "C:\Users\Admin\Desktop\eclipse-oxygen\workspace\FileStuff\resources"</p>
  
  <p>Does anyone have any idea why exactly this causes this Exception to occur? I am grateful for any advice, no matter how small.</p>