#include <nitro/fs.h>
BOOL FS_SetPathInfo(const char *path, const FSPathInfo *info);
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. |
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()
.
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:
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))
{
...
}
}
FSPathInfo
FS_GetPathInfo FS_GetArchiveResultCode
2007/07/18 Initial version.
CONFIDENTIAL