Functions | |
struct fat16_dir_struct * | fat16_open_dir (struct fat16_fs_struct *fs, const struct fat16_dir_entry_struct *dir_entry) |
void | fat16_close_dir (struct fat16_dir_struct *dd) |
uint8_t | fat16_read_dir (struct fat16_dir_struct *dd, struct fat16_dir_entry_struct *dir_entry) |
uint8_t | fat16_reset_dir (struct fat16_dir_struct *dd) |
uint8_t | fat16_create_dir (struct fat16_dir_struct *parent, const char *dir, struct fat16_dir_entry_struct *dir_entry) |
void fat16_close_dir | ( | struct fat16_dir_struct * | dd | ) |
Closes a directory descriptor.
This function destroys a directory descriptor which was previously obtained by calling fat16_open_dir(). When this function returns, the given descriptor will be invalid.
[in] | dd | The directory descriptor to close. |
Definition at line 1231 of file fat16.c.
References fat16_dir_struct::fs.
Referenced by fat16_get_dir_entry_of_path().
uint8_t fat16_create_dir | ( | struct fat16_dir_struct * | parent, | |
const char * | dir, | |||
struct fat16_dir_entry_struct * | dir_entry | |||
) |
Creates a directory.
Creates a directory and obtains its directory entry. If the directory to create already exists, its directory entry will be returned within the dir_entry parameter.
[in] | parent | The handle of the parent directory of the new directory. |
[in] | dir | The name of the directory to create. |
[out] | dir_entry | The directory entry to fill for the new directory. |
Definition at line 1888 of file fat16.c.
References fat16_dir_entry_struct::attributes, fat16_dir_entry_struct::cluster, fat16_header_struct::cluster_size, fat16_header_struct::cluster_zero_offset, fat16_dir_struct::dir_entry, fat16_dir_entry_struct::entry_offset, fat16_append_clusters(), FAT16_ATTRIB_DIR, fat16_clear_cluster(), fat16_find_offset_for_dir_entry(), fat16_free_clusters(), fat16_read_dir(), fat16_reset_dir(), fat16_write_dir_entry(), fat16_dir_struct::fs, fat16_fs_struct::header, and fat16_dir_entry_struct::long_name.
struct fat16_dir_struct* fat16_open_dir | ( | struct fat16_fs_struct * | fs, | |
const struct fat16_dir_entry_struct * | dir_entry | |||
) | [read] |
Opens a directory.
[in] | fs | The filesystem on which the directory to open resides. |
[in] | dir_entry | The directory entry which stands for the directory to open. |
Definition at line 1189 of file fat16.c.
References fat16_dir_entry_struct::attributes, fat16_dir_entry_struct::cluster, fat16_dir_struct::dir_entry, fat16_dir_struct::entry_cluster, fat16_dir_struct::entry_offset, FAT16_ATTRIB_DIR, FAT16_DIR_COUNT, fat16_dir_handles, and fat16_dir_struct::fs.
Referenced by fat16_get_dir_entry_of_path(), and main().
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.
[in] | dd | The descriptor of the parent directory from which to read the entry. |
[out] | dir_entry | Pointer to a buffer into which to write the directory entry information. |
Definition at line 1250 of file fat16.c.
References fat16_read_dir_callback_arg::bytes_read, fat16_dir_entry_struct::cluster, fat16_header_struct::cluster_size, fat16_header_struct::cluster_zero_offset, partition_struct::device_read_interval, fat16_dir_struct::dir_entry, fat16_read_dir_callback_arg::dir_entry, fat16_dir_struct::entry_cluster, fat16_dir_struct::entry_offset, fat16_cluster_offset(), fat16_dir_entry_read_callback(), fat16_get_next_cluster(), fat16_read_dir_callback_arg::finished, fat16_dir_struct::fs, fat16_fs_struct::header, fat16_dir_entry_struct::long_name, fat16_fs_struct::partition, and fat16_header_struct::root_dir_offset.
Referenced by fat16_create_dir(), fat16_create_file(), fat16_get_dir_entry_of_path(), find_file_in_dir(), and main().
uint8_t fat16_reset_dir | ( | struct fat16_dir_struct * | dd | ) |
Resets a directory handle.
Resets the directory handle such that reading restarts with the first directory entry.
[in] | dd | The directory handle to reset. |
Definition at line 1329 of file fat16.c.
References fat16_dir_entry_struct::cluster, fat16_dir_struct::dir_entry, fat16_dir_struct::entry_cluster, and fat16_dir_struct::entry_offset.
Referenced by fat16_create_dir(), fat16_create_file(), and find_file_in_dir().