mfsRamWriteFile
Format: s32 mfsRamWriteFile(MfsDirID dirID, void* buf, s32 offset,u32 len)
Arguments: dirID Directory ID of file
*buf Buffer in which data to be written is stored
offset Write starting position
len Size to be written
Return value:Size of data that was written (a negative value is an error)
Function: Writes data to file
Description: This function writes data to the file specified by dirID.
If the address specified by buf is not at a 16-byte boundary, the speed will decrease somewhat because the data is written after being copied to an internal buffer.
If the offset value is greater than the file size, an error will occur.
Main errors:
MFS_ERR_NOTFOUND Specified file not found
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.