ScalaIO: Using RamFileSystem / ramfs

76 views
Skip to first unread message

Randall R Schulz

unread,
Mar 7, 2013, 10:09:14 AM3/7/13
to scala-i...@googlegroups.com
Hi,

I'd like to explore the RamFileSystem as a kind of mocking tool in unit testing some code that is primarily about file system interactions.

I can find virtually nothing on-line (including in this forum) about this part of ScalaIO.

So my first question is: Is this part of ScalaIO in a usable state?
Secondly: If so, is there some material on how to use it that I'm failing to find?


Randall Schulz

Jesse Eichar

unread,
Mar 7, 2013, 10:24:54 AM3/7/13
to scala-i...@googlegroups.com
Hi,

It is useable and is part of my testing framework.  However the API to create a RamFS will change for the next version.  Other than that it will remain mainly the same.

The API you should use (other than creation) should be the high level API so that will stay stable.

val fs = new RamFileSystem(separator="/")
val path = fs("path/to/dir", '/')

I wouldn't say it is rock solid and to be used in production for it is useful for testing and mocking up a file system.

Jesse





Randall Schulz

--
 
---
You received this message because you are subscribed to the Google Groups "Scala Incubator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-incubat...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Randall R Schulz

unread,
Mar 7, 2013, 10:57:13 AM3/7/13
to scala-i...@googlegroups.com
Thanks, Jesse.

I guess I was expecting it to be more complicated or elaborate than it is...


Randall Schulz
Reply all
Reply to author
Forward
0 new messages