Hello!
How's this for a scheme?

    ram:<path>

Where <path> is a regular Unix-style path and ram:/ refers to the root set of the RAM filesystem.
Looks good to me!

One thing I currently thougth about is the scope of its content. By default the content is global to all users using the singleton FileSytemManager.
Though, we could use the FileSystemOptions to force VFS to create a new RamFileSystem instance.


FileSystemOptions fso1 = new FileSystemOptions();
RamFileSystemConfigBuilder.getInstance().setId(fso1, "fs1");
FileObject fo1 = VFS.getManager().resolveFile("ram:/", fso1);

FileSystemOptions fso2 = new FileSystemOptions();
RamFileSystemConfigBuilder.getInstance().setId(fso2, "fs2");
FileObject fo2 = VFS.getManager().resolveFile("ram:/", fso2);

Every time resolveFile is called with a different set of FileSystemOptions it create a new filesystem automatically, so the instances of fo1 and fo2 refers to two different (initially empty) filesystems.
That way the user is able to create global and/or local (for whatever scope he wants) ramfilesystems.


And - If you manage to monitor its size it would be nice if one could set its upper limitd with something like this:
RamFileSystemConfigBuilder.getInstance().setMaxSize(fso2, 1024000);


But I know, this is a challenge for its one and surely not needet for version 0.1beta ;-)

---
Mario


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to