![]() |
RTEMS
5.1
|
Files | |
file | fat_file.c |
General operations on "fat-file". | |
file | fat_file.h |
Constants/Data Structures/Prototypes for Operations on "fat-file". | |
Data Structures | |
struct | fat_file_map_s |
The "fat-file" representation. More... | |
struct | fat_file_fd_s |
Descriptor of a fat-file. More... | |
Macros | |
#define | FAT_FILE_REMOVED 0x01 |
#define | FAT_FILE_META_DATA_CHANGED 0x02 |
#define | F_CLU_NUM 0x01 |
#define | FAT_ROOTDIR_CLUSTER_NUM 0x01 |
#define | FAT_FD_OF_ROOT_DIR(fat_fd) |
#define | FAT_EOF 0x00 |
Typedefs | |
typedef struct fat_file_map_s | fat_file_map_t |
The "fat-file" representation. More... | |
typedef struct fat_file_fd_s | fat_file_fd_t |
Descriptor of a fat-file. More... | |
Enumerations | |
enum | fat_file_type_t { FAT_DIRECTORY = 0, FAT_HARD_LINK = 2, FAT_FILE = 4 } |
Functions | |
int | fat_file_open (fat_fs_info_t *fs_info, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd) |
int | fat_file_reopen (fat_file_fd_t *fat_fd) |
int | fat_file_close (fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd) |
ssize_t | fat_file_read (fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf) |
ssize_t | fat_file_write (fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf) |
int | fat_file_extend (fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, bool zero_fill, uint32_t new_length, uint32_t *a_length) |
int | fat_file_truncate (fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, uint32_t new_length) |
int | fat_file_ioctl (fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, int cmd,...) |
int | fat_file_size (fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd) |
void | fat_file_mark_removed (fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd) |
int | fat_file_write_first_cluster_num (fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd) |
int | fat_file_write_file_size (fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd) |
int | fat_file_write_time_and_date (fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd) |
int | fat_file_update (fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd) |
#define FAT_FD_OF_ROOT_DIR | ( | fat_fd | ) |
typedef struct fat_file_fd_s fat_file_fd_t |
Descriptor of a fat-file.
To each particular clusters chain
typedef struct fat_file_map_s fat_file_map_t |
The "fat-file" representation.
the idea is: fat-file is nothing but a cluster chain, any open fat-file is represented in system by fat-file descriptor and has well-known file interface:
fat_file_open() fat_file_close() fat_file_read() fat_file_write()
Such interface hides the architecture of fat-file and represents it like linear file