Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This question sounds similar to <a href="https://stackoverflow.com/questions/5508601/how-to-create-a-directory-in-memory-pseudo-file-system-virtual-directory">How to create a directory in memory? pseudo file system / virtual directory</a>. Basically, my suggestion is to use a more general solution- an in-memory virtual filesystem (and I don't mean on OS level, like Linux' ramfs/tmpfs).</p> <p>One example is to use the Java 7 NIO APIs, which now provide an SPI for implementing a file system via <a href="http://download.oracle.com/javase/7/docs/api/java/nio/file/spi/FileSystemProvider.html" rel="nofollow noreferrer">FileSystemProvider</a>. It seems that the <a href="http://exitcondition.alrubinger.com/2012/08/17/shrinkwrap-nio2/" rel="nofollow noreferrer">ShrinkWrap</a> filesystem implements this SPI.</p> <p>A more accessible option would be to use Apache Commons VFS' <a href="http://commons.apache.org/vfs/filesystems.html#ram" rel="nofollow noreferrer">ram filesystem</a>: it requires only Java 5. If you need to be compatible with Java 5 and 6, this is probably your best bet.</p> <p>I first remember reading about in-memory filesystems in Java from <a href="http://java.dzone.com/news/in-memory-virtual-filesystems" rel="nofollow noreferrer">this article</a>, which apart from pointing out solutions like Commons VFS and <a href="http://www.jboss.org/jbossmc/" rel="nofollow noreferrer">JBoss Microcontainer</a>, gives a nice example use case for the NetBeans IDE.</p> <p>While an in-memory virtual filesystem is a nice general solution of avoiding the OS-level filesystem (with the associated performance benefits), it probably suffers from other disadvantages, which more specialized solutions could address. For instance, I am not sure how using this filesystem would behave when used concurrently from multiple threads. It might work fine as long as you don't access the same files, or you might need to create separate filesystems (which might be prohibitive in terms of resource usage).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload