title: How to use Java nio's Files.move in Matlab
body: <p>I want to use the <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html" rel="nofollow noreferrer"><code>java.nio.file.Files.move()</code></a> method in Matlab.</p>
  <p>Although I only need the default behavior, Matlab requires all 3 inputs or would throw the <code>No method ... with matching signature found.</code> error. Passing <code>[]</code> (which I think gets converted to <code>null</code> though not <a href="https://www.mathworks.com/help/matlab/matlab_external/passing-data-to-java-methods.html" rel="nofollow noreferrer">documented</a>) gets the <code>java.lang.NullPointerException</code> error.</p>
  <p>How do I make an <code>CopyOption</code> object in Matlab?</p>
  <hr />
  <p>Example:</p>
  <pre class="lang-matlab prettyprint-override"><code>&gt;&gt; version -java
  ans =
      'Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
  
  zipFilePath=java.nio.file.Paths.get('test.zip',javaArray('java.lang.String', 0));
  zipFileSystem=java.nio.file.FileSystems.newFileSystem(zipFilePath,[]);
  
  path1=zipFileSystem.getPath('/test.txt',javaArray('java.lang.String', 0));
  path2=zipFileSystem.getPath('/test_changed.txt',javaArray('java.lang.String', 0));
  
  % java.nio.file.Files.move(path1,path2,???); % what should ??? be..
  
  java.nio.file.Files.move(path1,path2,java.nio.file.StandardCopyOption.COPY_ATTRIBUTES)
  No method 'java.nio.file.Files.move' with matching signature found. 
  
  zipFileSystem.close();
  
  </code></pre>
  <p>(I am also attaching my particular use of <code>.move()</code> in case there is something else that matters but I don't know.)</p>