Chris Thompson
2008-10-22 16:01:15 UTC
I was under the impression that to write to a file, we would just make a
call to StubFileSystem's write method, since regular FileSystem only
provides us with support for open, create, and remove. However, it seems
that every instance of a FileSystem (the one created in ThreadedKernel
that is returned by Machine.java) are of the regular FileSystem type,
and I can find no ways to write to a file without implementing the
details myself, which we were not supposed to do. I don't think we can
cast fileSystem as a StubFileSystem, nor can I create any new instances
of a StubFileSystem (it requires parameters that are only available to
Machine.java), so I think I'm missing something big here. Is there an
object that we have access to that has the ability to write to disk?
call to StubFileSystem's write method, since regular FileSystem only
provides us with support for open, create, and remove. However, it seems
that every instance of a FileSystem (the one created in ThreadedKernel
that is returned by Machine.java) are of the regular FileSystem type,
and I can find no ways to write to a file without implementing the
details myself, which we were not supposed to do. I don't think we can
cast fileSystem as a StubFileSystem, nor can I create any new instances
of a StubFileSystem (it requires parameters that are only available to
Machine.java), so I think I'm missing something big here. Is there an
object that we have access to that has the ability to write to disk?