FSDirectoryEntryInfo(W)

Definition


#define	FS_ENTRY_SHORTNAME_MAX      16
#define	FS_ENTRY_LONGNAME_MAX	    260

typedef struct FSDirectoryEntryInfo
{
    char        shortname[FS_ENTRY_SHORTNAME_MAX];
    u32         shortname_length;
    char        longname[FS_ENTRY_LONGNAME_MAX];
    u32         longname_length;
    u32         attributes;
    FSDateTime  atime;
    FSDateTime  mtime;
    FSDateTime  ctime;
    u32         filesize;
    u32         id;
}
FSDirectoryEntryInfo;

typedef struct FSDirectoryEntryInfoW
{
    u32         attributes;
    FSDateTime  atime;
    FSDateTime  mtime;
    FSDateTime  ctime;
    u32         filesize;
    u32         id;
    u32         shortname_length;
    u32         longname_length;
    char        shortname[FS_ENTRY_SHORTNAME_MAX];
    u16         longname[FS_ENTRY_LONGNAME_MAX];
}
FSDirectoryEntryInfoW;

Description

This structure indicates the entry information that can be obtained with the FS_ReadDirectory or FS_ReadDirectoryW function. The details of each member are as follows.

shortnameThe entry name in so-called "FAT format" (8.3 format). An entry name will only be stored here if there was originally a longer name that has been shortened. Otherwise, this will be an empty string. This field's character code depends upon the file creation environment. It will be Shift_JIS for files created on the TWL system.
shortname_lengthThe effective length of shortname. The shortname member will always be terminated with "\0." This is provided for convenience.
longnameThe entry name. This is stored using Shift_JIS in a FSDirectoryEntryInfo structure and UTF16-LE in a FSDirectoryEntryInfoW structure.
longname_lengthThe effective length of longname. The longname member will always be terminated with "\0." This is provided for convenience.
attributesThe attributes of the entry. The meaning of each flag is the same as the attributes member of FSPathInfo.
mtimeThe last date/time modified for an entry, expressed as an FSDateTime type. If the date/time information is invalid, all members will be 0.
filesizeSize of the file. Only valid if the entry is a file.
idThe ID of the file or directory. The value that is obtained can be used with functions such as FS_OpenFileFast(). In cases where file IDs or directory IDs are not supported, such as with NAND archives, FS_INVALID_FILE_ID will always result.

See Also

FS_CreateFile FS_CreateDirectory

Revision History

2008/09/02 Added notes concerning Unicode versions of the structures.
2008/06/13 Combined the description of the attributes flag with FSPathInfo, and added a link.
2007/09/18 Initial version.


CONFIDENTIAL