-2

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?

Vishal Swami
  • 3
  • 1
  • 6

2 Answers2

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
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