File and Directory Handling

The directory module supports operations on the directory. It provides support for searching the directory for a given file, creation and deletion of entries and renaming entries.

A small cache of directory entries, called dirnodes, is maintained. This allows separate opens of the same file to share the directory entry and other information.

To allow easy location of unused directory entries, and to avoid searching free entries, the module maintains a bitmap of which directory entries are allocated. This map is constructed during the initial scan and maintained as entries are added and removed.

The file module supports the creation, deletion, reading and writing of the contents of a file. The standard file IO operations are supported together with streaming access. Each open file is accessed through a file object, which is also maintained by this module.

The block freelist is also managed by the file module, as is a bitmap recording the allocation state of all the BATs.

2017-02-09
Documentation license for this page: eCosPro License