Basic functions for handling a FAT filesystem.
More...
Functions |
struct fat_fs_struct * | fat_open (struct partition_struct *partition) |
| Opens a FAT filesystem.
|
void | fat_close (struct fat_fs_struct *fs) |
| Closes a FAT filesystem.
|
offset_t | fat_get_fs_size (const struct fat_fs_struct *fs) |
| Returns the amount of total storage capacity of the filesystem in bytes.
|
offset_t | fat_get_fs_free (const struct fat_fs_struct *fs) |
| Returns the amount of free storage capacity on the filesystem in bytes.
|
uint8_t | fat_get_fs_free_32_callback (uint8_t *buffer, offset_t offset, void *p) |
| Callback function used for counting free clusters in a FAT32.
|
Detailed Description
Basic functions for handling a FAT filesystem.
Function Documentation
Closes a FAT filesystem.
When this function returns, the given filesystem descriptor will be invalid.
- Parameters:
-
[in] | fs | The filesystem to close. |
- See also:
- fat_open
Returns the amount of free storage capacity on the filesystem in bytes.
- Note:
- As the FAT filesystem is cluster based, this function does not return continuous values but multiples of the cluster size.
- Parameters:
-
[in] | fs | The filesystem on which to operate. |
- Returns:
- 0 on failure, the free filesystem space in bytes otherwise.
Returns the amount of total storage capacity of the filesystem in bytes.
- Parameters:
-
[in] | fs | The filesystem on which to operate. |
- Returns:
- 0 on failure, the filesystem size in bytes otherwise.
Opens a FAT filesystem.
- Parameters:
-
[in] | partition | Discriptor of partition on which the filesystem resides. |
- Returns:
- 0 on error, a FAT filesystem descriptor on success.
- See also:
- fat_close