Create temp File object in jimfs?

376 Views Asked by At

I would like to get File object from jimfs - in order to use it with a 3rd party library.

private FileSystem fs = Jimfs.newFileSystem(Configuration.unix());                          
Path path = Files.createTempFile(
                                Files.createDirectories(fs.getPath("tmp")),
                                "myTempFile",
                                ".mp3");

When I call toFile() on Path I get Operation Not Supported

How I can obtain File from Path with jimfs?

1

There are 1 best solutions below

0
On BEST ANSWER

It looks like it's not possible since File can be created only for default filesystem...