On this page, you will find an approach to design a JOS file system. It is open for comments and contributions, as always.
is available at FilesystemCode. The architecture described on this page is a little bit more up to date than the code.
Some key elements:
org.jos.fs.Mediummodels low-level storage medium access
org.jos.fs.FileSystemmodels access to files and directories
org.jos.fs.FSManagerkeeps track of registered Medium-s (media) and FileSystem-s. Every Medium has one FileSystem, at most. The FSManager also holds a reference to the main FS. The main FS is a UnionFileSystem that allows mounting of individual FileSystems, in a Unix-like manner (/diskdrive/..., /mount/anothersystem/...).
I finally found a FreeWare drawing software for Windows, the fantastic Grids. Now I can save a lot of words and show you the file system architecture in two scenarios (host/standalone):
|org.jos.api||The JOS API (see StefansAPIStructureProposal)|
|org.jos.fs||Interfaces Medium, FileSystem. Class FSManager that ties together the whole file system|
|org.jos.fs.fat||VFAT access as Pluggable File System|
|org.jos.fs.host||Class HostFileMedium to mount the host FS as part of the JOS FS. Some host-related utility classes|
|org.jos.fs.util||Classes ImageFileMedium, CachedMedium. Some utility classes|
|org.jos.java.io||Pure Java duplicates of Sun's java.io.* classes.|
In a JOS standalone distribution, these migrate to java.io and replace Sun's classes