fat16.h File Reference


Detailed Description

FAT16 header.

Author:
Roland Riegel


Data Structures

struct  fat16_dir_entry_struct
 Describes a directory entry. More...

Defines

#define FAT16_ATTRIB_READONLY
 The file is read-only.
#define FAT16_ATTRIB_HIDDEN
 The file is hidden.
#define FAT16_ATTRIB_SYSTEM
 The file is a system file.
#define FAT16_ATTRIB_VOLUME
 The file is empty and has the volume label as its name.
#define FAT16_ATTRIB_DIR
 The file is a directory.
#define FAT16_ATTRIB_ARCHIVE
 The file has to be archived.
#define FAT16_SEEK_SET
 The given offset is relative to the beginning of the file.
#define FAT16_SEEK_CUR
 The given offset is relative to the current read/write position.
#define FAT16_SEEK_END
 The given offset is relative to the end of the file.

Functions

fat16_fs_struct * fat16_open (struct partition_struct *partition)
 Opens a FAT16 filesystem.
void fat16_close (struct fat16_fs_struct *fs)
 Closes a FAT16 filesystem.
fat16_file_struct * fat16_open_file (struct fat16_fs_struct *fs, const struct fat16_dir_entry_struct *dir_entry)
 Opens a file on a FAT16 filesystem.
void fat16_close_file (struct fat16_file_struct *fd)
 Closes a file.
int16_t fat16_read_file (struct fat16_file_struct *fd, uint8_t *buffer, uint16_t buffer_len)
 Reads data from a file.
int16_t fat16_write_file (struct fat16_file_struct *fd, const uint8_t *buffer, uint16_t buffer_len)
 Writes data to a file.
uint8_t fat16_seek_file (struct fat16_file_struct *fd, int32_t *offset, uint8_t whence)
 Repositions the read/write file offset.
uint8_t fat16_resize_file (struct fat16_file_struct *fd, uint32_t size)
 Resizes a file to have a specific size.
fat16_dir_struct * fat16_open_dir (struct fat16_fs_struct *fs, const struct fat16_dir_entry_struct *dir_entry)
 Opens a directory.
void fat16_close_dir (struct fat16_dir_struct *dd)
 Closes a directory descriptor.
uint8_t fat16_read_dir (struct fat16_dir_struct *dd, struct fat16_dir_entry_struct *dir_entry)
 Reads the next directory entry contained within a parent directory.
uint8_t fat16_reset_dir (struct fat16_dir_struct *dd)
 Resets a directory handle.
uint8_t fat16_create_file (struct fat16_dir_struct *parent, const char *file, struct fat16_dir_entry_struct *dir_entry)
 Creates a file.
uint8_t fat16_delete_file (struct fat16_fs_struct *fs, struct fat16_dir_entry_struct *dir_entry)
 Deletes a file or directory.
uint8_t fat16_get_dir_entry_of_path (struct fat16_fs_struct *fs, const char *path, struct fat16_dir_entry_struct *dir_entry)
 Retrieves the directory entry of a path.


Generated on Thu Mar 16 13:43:58 2006 for sd-reader by  doxygen 1.4.6