Format: s32 mfsHGetStat(const u8* path, MfsStat* stat)
Arguments:
*path Pathname *stat File information structure pointer
Return value:Error
Function: Obtains file or directory information
Description: This function obtains information related to the file or directory specified by path and returns it to the MfsStat structure specified by stat. The MfsStat structure consists of the following members.
typedef struct st_stat{ u32 size; // File size LEODiskTime time; // Latest update date and time of file u16 attribute; // Attribute u16 dirID; // Directory ID u16 upDirID; // Directory ID of parent directory u8 gameCode[4]; // Game code u8 companyCode[2]; // Company code u8 copyCounter; // Copy counter u8 renewalCounter; // Update counter } MfsStat;
However, the structure for a directory does not have the file size or copy counter members.
MFS_ERR_NO Normal termination MFS_ERR_DEVICE Device error An error occurred in an internally called Leo function. Since a Leo function error is stored in the variable mfsError, check this variable to perform processing. MFS_ERR_NOTFOUND File not found The file was not found, or the directory was not found.