<< Previous | Next >>

fat_GetName

int fat_GetName( fat_dirent *entry, char *buf, word flags );

Description

Translates the file or directory name in the fat_dirent structure into a printable name. FAT file names are stored in a strict fixed-field format in the fat_dirent structure (returned from fat_Status, for example). This format is not always suitable for printing, so this function should be used to convert the name to a printable null-terminated string.

Parameters

entry
Pointer to a directory entry obtained by fat_Status().

buf
Pointer to a char array that will be filled in. This array must be at least 13 characters long.

flags
May be one of the following:

  • 0 - standard format, e.g., AUTOEXEC.BAT or XYZ.GIF

  • FAT_LOWERCASE - standard format, but make lower case.

Return Value

0: success.
-EINVAL: invalid (NULL) parameter(s).

Library

FAT.LIB

See Also

fat_ReadDir, fat_Status


Dynamic C Functions << Previous | Next >> rabbit.com