Reading and Writing files

Mar 31, 2012 at 9:22 PM
Hey, Ive some questions and they say:
How to use the Filesystem in Cosmos?

*Let's say that I've a basic OS and I'm booting it from a flash stick that contains some text files, so the real question is how to read and to write to these files??
*Let's say that it is not possible yet to do the things above so let's say these files are in the OS (text files in the source of the OS "Besides the kernel file in the Visual Studio") how to write them and how to read them???

Help!!
Apr 1, 2012 at 6:37 AM
ahmed01000410657 wrote:
Hey, Ive some questions and they say:
How to use the Filesystem in Cosmos?

*Let's say that I've a basic OS and I'm booting it from a flash stick that contains some text files, so the real question is how to read and to write to these files??
*Let's say that it is not possible yet to do the things above so let's say these files are in the OS (text files in the source of the OS "Besides the kernel file in the Visual Studio") how to write them and how to read them???

Help!!

For your first point, that would not be possible, as you thought, but your second point would just create a temporary file stored in memory. If you want to use FAT at the moment, I think (correct me if I'm wrong) you need a seperate test bed with a hard drive fully formatted to FAT, and some special setup on the SATA controllers.

Apr 1, 2012 at 10:09 PM

This is what I meant:

I meant to have a text file in the project solution (Besides the Kernel.cs I'd make a text file named Data.txt) so how to read and write this file from the OS???

Thanks for help!

Apr 2, 2012 at 7:09 AM

I think IL2CPU doesn't include stuff like that, I'm not sure...

Coordinator
Apr 2, 2012 at 7:16 AM
We had a way to include a manifest resource stream as a static byte[], not sure if that still works..
have a look at the compiler sources, the place where it emits the static fields...
But keep in mind that this stream is memory, and does not get written to persistent storage after kernel run..


On Mon, Apr 2, 2012 at 9:09 AM, Aurora01 <notifications@codeplex.com> wrote:

From: Aurora01

I think IL2CPU doesn't include stuff like that, I'm not sure...

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com