Implementing a File System

Hello everybody.  I need to implement a filesystem on a diskette, with operations such as format, copy files, directories, etc.  I need to implement my own FS architecture, so I need a way to access directly the data blocks on the diskette.  How can I do that



Answer this question

Implementing a File System

  • Jeremy H.

    Hey andro, I need to implement a similar file system with your specs. If you do find anything related, or the implementation of the file system, could you patch it through to me Thanks
  • Aaron Erickson

    Hello, the only way i found was wrapping the windows api with functions like "CreateFile", "ReadFile" and "WriteFile" on the kernel32.dll.  I found a good resource on this site.  Anyway, I'm still trying to get it to work well Tongue Tied.  Thanks for all your help.


  • moaner

    Another option that I had was using linux, since all devices are treated like files, I would only have to open, read and write to the file /dev/fd0, but I thought it was a pretty easy solution.


  • Uroj

    Hi,

    I think this is quite a general question. IMO, this could be achieved using low-level language such as C++, or even assembly. Read books that discusses this kind of approach. And If you encounter some specific problems then don't hesitate to post it here...

     

     

    cheers,

    Paul June A. Domag



  • mjd918

    Hi,

    It sould be possible to write a filesystem in C# as well. In fact Microsoft Research has an OS in C#. Take a look here: http://research.microsoft.com/os/singularity/

    However, based on your need which requires more of a direct low-level access, I would agree with Paul in saying that C++ would be the way to go.

    Regards,
    Vikram

  • rikmar

    I'd have to agree with Paul and Vikram. You probably want to be looking at writing using C or C++. That said, you may want to look at TinyOS written by Scott Hanselman. A simple implementation, but it will give you the general idea of what goes into a file system. Another good source of the C++ bent is NACHOS (Not Another Completely Heursitic Operating System), which I worked with in university. Great little toy OS for exploring OS concepts, including file systems. You might also want to explore the FreeBSD and/or Linux kernels for their file system implementations. A good discussion of file systems from an implementation perspective can be found in The Design and Implementation of the 4.4 BSD Operating System aka "The Little Demon Book".

  • Implementing a File System