File-system

User-space API

The following table lists all functions related to the file-system manager API.

API Description

BT_Open()

Opens a handle to an object (file/device/fifo/socket ...) from the Virtual File-system.

BT_OpenDir()

Opens a BT_HANDLE to a directory like object for traversing.

BT_GetInode()

Get a BT_HANDLE for the i-Node associated with the specified path.

Kernel-mode API

API Description

BT_RegisterFilesystem()

Registers a file-system with the file-system manager.

BT_Mount()

Attempts to mount a file-system on the specified block-device. (Usually a Volume Handle).

Design Overview

The filesystem is designed to provide a simple abstraction across all filesystems. Usually this means a block based filesystem like FAT (FullFAT) or EXT, but can also be for pseudo-filesystems like the device manager’s devfs implementation.

Further Reading

The full API is defined under:

os/include/fs/bt_fs.h

See the implementation under:

os/src/fs/bt_fs.c

See the driver interface under:

os/include/interfaces/bt_if_fs.h os/include/interfaces/bt_if_file.h os/include/interfaces/bt_if_dir.h

Back