

#include <nitro/fs.h>
s32 FS_WriteFile(FSFile* p_file, const void *src, s32 len);
| file | FSFile structure that indicates an opened file. |
| src | Transfer source buffer There is no need to store the cache in advance. |
| len | Byte length of data to be written. |
Returns the number of bytes if the data was written properly. If not, returns -1.
This function writes data of the specified size beginning at the current location of the file pointer.
When the specified size is greater than the available memory, data is written until the available memory is used up. The size of the written data is returned. The standard archives whose size can be increased automatically are the SD memory card archive and the NAND archive for NAND applications.
The size cannot be increased automatically for standard archives other than these.
FS_CloseFile
FSFile
FS_GetFileLength
FS_OpenFileEx
FS_OpenFileFast
FS_SeekFile
FS_SeekFileToBegin
FS_SeekFileToEnd
2009/12/11 Revised the archives whose size can be increased automatically.
2009/12/01 Clarified which archives can be automatically increased in size.
2008/10/02 Updated part of the See Also list.
2008/02/27 Explained that cache storage of write data is unnecessary.
2004/09/24 Added the description in the Caution section regarding the conditions for calling this function.
2004/07/13 Initial version.
CONFIDENTIAL