# FS_SetPathInfo

## Syntax

    #include <nitro/fs.h>

    BOOL FS_SetPathInfo(const char *path, const FSPathInfo *info);

## Arguments

path | Path name of the file or directory whose information you want to change.
info | Pointer to the `FSPathInfo` structure where the data to be changed is stored.

## Return Values

Returns TRUE if the entry information for the specifed path was changed properly; returns FALSE otherwise. In case of failure, the error details can be obtained using `FS_GetArchiveResultCode()`.

## Description

Changes the entry information for the specified file or directory. If there is a file or directory at the specified path, this function changes the entry information and returns TRUE. The function returns FALSE in the following situations:

- If there is no file or directory at the specified path
- If the archive does not support the ability to change entry information

Few archives support the ability to change entry information, and even when this is possible, it does not necessarily mean that all information that can be obtained with `FS_GetPathInfo()` can be changed at will. For example, with NAND archives and SD card archives, nothing can be changed except the `FS_ATTRIBUTE_DOS_READONLY` and `FS_ATTRIBUTE_DOS_ARCHIVE` bits, and the settings will be ignored. A simple example of this usage is shown below.

    /* Remove the read-only attribute. */
    FSPathInfo info[1];
    if (FS_GetPathInfo(path, info))
    {
        info->attributes &= ~FS_ATTRIBUTE_DOS_READONLY;
        if (FS_SetPathInfo(path, info))
        {
            ...
        }
    }

## Note

- This function cannot be called from the interrupt handler (IRQ mode). Also note that in some cases processing may not end if interrupts are left prohibited.

## See Also

`FSPathInfo
FS_GetPathInfo FS_GetArchiveResultCode`

## Revision History

2007/07/18 Initial version.

CONFIDENTIAL