# FSPathInfo

## Definition

    #define FS_ATTRIBUTE_IS_DIRECTORY   0x00000100UL
    #define FS_ATTRIBUTE_IS_PROTECTED   0x00000200UL
    #define FS_ATTRIBUTE_IS_OFFLINE     0x00000400UL

    #define FS_ATTRIBUTE_DOS_MASK       0x000000FFUL
    #define FS_ATTRIBUTE_DOS_READONLY   0x00000001UL
    #define FS_ATTRIBUTE_DOS_HIDDEN     0x00000002UL
    #define FS_ATTRIBUTE_DOS_SYSTEM     0x00000004UL
    #define FS_ATTRIBUTE_DOS_VOLUME     0x00000008UL
    #define FS_ATTRIBUTE_DOS_DIRECTORY  0x00000010UL
    #define FS_ATTRIBUTE_DOS_ARCHIVE    0x00000020UL

    typedef struct FSPathInfo
    {
        u32         attributes;
        FSDateTime  ctime;
        FSDateTime  mtime;
        FSDateTime  atime;
        u32         filesize;
        u32         id;
    }
    FSPathInfo;

## Description

A structure that indicates the entry information that can be obtained with `FS_GetPathInfo()`. The details of each member are as follows.

attributes

The attributes of the entry. This is a combination of the attributes indicated by `FS_ATTRIBUTE_*`.

FS_ATTRIBUTE_IS_DIRECTORY | This indicates that the entry is a directory.
FS_ATTRIBUTE_IS_PROTECTED | This indicates that the entire archive that the entry belongs to is in a state in which writes are prohibited at a hardware level. This flag might be valid for ROM archives or SD Card archives, for example.
FS_ATTRIBUTE_IS_OFFLINE | Indicates that the file referred to by the entry cannot be accessed in the current operating environment. This flag is returned when a program running in the NITRO environment has referred to the information of a TWL-only file. (For more information on the specification of TWL-only files, see the explanation about the `Put` parameter in makerom.TWL.)
The attributes below are only valid for archives based on the FAT format.
FS_ATTRIBUTE_DOS_READONLY | Indicates that the entry is read-only.
FS_ATTRIBUTE_DOS_HIDDEN | This indicates that the entry is a hidden file.
FS_ATTRIBUTE_DOS_SYSTEM | This indicates that the entry is a system file.
FS_ATTRIBUTE_DOS_VOLUME | This indicates that the entry is a volume label.
FS_ATTRIBUTE_DOS_DIRECTORY | This indicates that the entry is a directory. This is the same as FS_ATTRIBUTE_IS_DIRECTORY.
FS_ATTRIBUTE_DOS_ARCHIVE | This indicates that the entry is an archive file.

ctime | The creation date/time for an entry, expressed as an `FSDateTime` type. If the date/time information is invalid, all members will be 0.
mtime | The last date/time modified for an entry, expressed as an `FSDateTime` type. If the date/time information is invalid, all members will be 0.
atime | The last-accessed date/time for an entry, expressed as an `FSDateTime` type. If the date/time information is invalid, all members will be 0.
filesize | Size of the file. Only valid if the entry is a file.
id | The 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_GetPathInfo`

## Revision History

2009/01/08 Added explanation about TWL-only files.
2008/12/08 Added the `FS_ATTRIBUTE_IS_OFFLINE` flag.
2008/06/13 Added the `FS_ATTRIBUTE_IS_PROTECTED` flag.
2007/12/13 Initial version.

CONFIDENTIAL