Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

Card File System 1.0

Data Organisation On The Card

Base Blocks

The memory of the card is divided into base blocks (size is currently 32 bytes). This is the smallest element that my file system operates on. The size of everything in this file system is a multiple of those basic block's size.

Super Block

At the beginning of the memory an informational table describing the file system itself can be found (CTSuperBlock).

Block Allocation Table

Directly behind this super block is the block allocation table. Others would call it a FAT (file allocation table). The size of this FAT is fixed to 256 bytes. Each entry of the FAT is one byte wide and it corresponds to one data block (the size of a data block depends on the capacity of the card, but it is a multiple of a basic block's size). Each entry holds one of the following:

When allocating a data block the FAT is scanned for an entry flagging a free block (see above). If one is found then it will be set with the special value flagging that this block is the last block of a chain. When the next block is to be allocated, then additionally the previous block (which now is not at the end anymore) receives the number of the following block. The number of the first block is stored in the file's directory entry, thus creating a block chain.
The older ones among you may recognize this scheme. That's the way MSDOS managed floppies and hard discs with their old FAT (before NTFS or FAT32 came ;-)

Directory Entries

Each file and folder is represented by a special table (CTDirEntry). This entry holds information about the file or folder. If a folder contains sub folders, then their entries are stored within the data area of the parent directory.
Generated on Fri Dec 3 23:10:25 2004 for libchipcard by  doxygen 1.3.9.1