FAT access
[FAT support]


Detailed Description

Basic functions for handling a FAT filesystem.


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.


Function Documentation

void fat_close ( struct fat_fs_struct *  fs  ) 

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

offset_t fat_get_fs_free ( const struct fat_fs_struct *  fs  ) 

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.

offset_t fat_get_fs_size ( const struct fat_fs_struct *  fs  ) 

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.

struct fat_fs_struct* fat_open ( struct partition_struct partition  )  [read]

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


Generated on Fri Nov 21 09:17:15 2008 for sd-reader by  doxygen 1.5.6