how to create in-memory folder in java. I have a requirement of creating a folder in-memory and then write files in it. Is it possible? If yes how?
Asked
Active
Viewed 2,509 times
-2
-
Do you mean like a "virtual drive"? – Steve Smith Aug 30 '17 at 13:37
2 Answers
0
In plain java (before java 7) i do not think is possible, however you could use the apache common vfs library which has a RAM file system type. In java 7 and above (as suggested by @ervin-szilagyi) you could implement your own FileSystemProvider
Hope this helps.

gtosto
- 1,381
- 1
- 14
- 18
-
2Actually you can in Java 7 and above: http://docs.oracle.com/javase/7/docs/api/java/nio/file/spi/FileSystemProvider.html – Ervin Szilagyi Aug 30 '17 at 13:41
-
0
I am not quite sure about the term "in-memory folder" but I would guess you mean temporary files and directories?
If that is what you are looking for then this question should help you: How to create a temporary directory/folder in Java?

AK_is_curious
- 239
- 5
- 13