I want to use the java.nio.file.Files.move() method in Matlab.
Although I only need the default behavior, Matlab requires all 3 inputs or would throw the No method ... with matching signature found. error. Passing [] (which I think gets converted to null though not documented) gets the java.lang.NullPointerException error.
How do I make an CopyOption object in Matlab?
Example:
>> 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();
(I am also attaching my particular use of .move() in case there is something else that matters but I don't know.)