descriptionA minimal FAT I/O library for embedded systems
homepage URLhttps://github.com/mbitsnbites/mfat
repository URLhttps://github.com/mbitsnbites/mfat.git
ownerm@bitsnbites.eu
last changeThu, 31 Aug 2023 18:16:53 +0000 (31 20:16 +0200)
last refreshThu, 21 Nov 2024 07:52:47 +0000 (21 08:52 +0100)
content tags
add:
README.md

⚠️ This repository has moved to: https://gitlab.com/mbitsnbites/mfat

MFAT

MFAT is a minimal I/O library for FAT (File Allocation Table) volumes.

The library has been designed for embedded systems, and its small code and memory footprint makes it suitable for inclusion in firmware/ROM and/or small OS kernels.

Features

Limitations

The internal MFAT context is statically allocated, meaning:

Also: MFAT is still work-in-progress.

POSIX compatibility

The API of this library is modelled after the POSIX.1-2017 file I/O C API:s.

These are the MFAT functions that are inspired by POSIX functions:

MFAT functionPOSIX prototype
mfat_close()close()
mfat_closedir()closedir()
mfat_fdopendir()fdopendir()
mfat_fstat()fstat()
mfat_lseek()lseek()
mfat_open()open()
mfat_opendir()opendir()
mfat_read()read()
mfat_readdir()readdir()
mfat_stat()stat()
mfat_sync()sync()
mfat_write()write()

Note that the library is not fully POSIX compliant. For instance:

While the library itself is not fully POSIX compliant, it is suitable as a low level I/O implementation layer for higher level libraries, such as newlib.

It is also easy to modify existing programs that use POSIX I/O routines to use the MFAT library instead.

FAT Documentation

FAT.md

shortlog
2023-08-31 mbitsnbitesUpdate README.mdmaster
2023-03-29 mMake opendir() and friends optional (add MFAT_ENABLE_OP...
2023-03-29 mFix compilation warnings when MFAT_ENABLE_WRITE=0
2022-11-26 mFix handling of . and ..
2022-11-26 mMerge branch 'feature/directory_functions'
2022-11-26 mAdd directory reading functions
2022-11-26 mAdd mfatdir example program
2022-11-26 mREADME: List the new directory functions
2022-11-26 mSupport "." and ".." folders
2022-11-26 mAdd support for opening directories with open()
2022-11-26 mExclude unsupported file types when opening files
2022-11-25 mRename internal partition type constants
2022-11-25 mRename _mfat_get_file() to _mfat_fd_to_file()
2022-11-25 mFAT16: Fix incorrect loop condition for root dir
2022-11-24 mFix incorrect path traversal
2022-11-24 mUse inttypes.h to improve portability of formatted...
...
heads
14 months ago master
23 months ago feature/cache_path_lookups