# mfsHSetAttr

Format: s32 mfsHSetAttr(const u8* path, u16 attr)

Arguments:

*path Pathname
attr Attribute

Return value:Error

Function: Sets attribute of file or directory

Description: This function sets the attribute of the file or directory specified by path to attr. The following values can be specified for attr.

    MFS_FILE_ATTR_FORBID_W	0x2000	Write protected
    MFS_FILE_ATTR_FORBID_R	0x1000	Read protected
    MFS_FILE_ATTR_HIDDEN	0x0800	Hidden file
    MFS_FILE_ATTR_ENCODE	0x0400	Encoded file
    MFS_FILE_ATTR_COPYLIMIT 0x0200	Copy limited

MFS_FILE_ATTR_ENCODE and MFS_FILE_ATTR_COPYLIMIT are ineffective for a directory.

Main errors:

    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_PROTECT	Write protected
    		The file attribute is write protected, or the volume attribute is write protected, or the parent directory is write protected.
    MFS_ERR_NOTFOUND File not found
    		The file was not found, or the directory was not found.