FS_WriteFile

Syntax


#include <nitro/fs.h>
s32	FS_WriteFile(FSFile* p_file, const void *src, s32 len);

Arguments

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.

Return Values

Returns the number of bytes if the data was written properly. If not, returns -1.

Description

This function writes data of the specified size beginning at the current location of the file pointer.

If the specified size exceeds the end of the file, the size is automatically increased for the SD memory card archive and NAND archive.
For other standard archives, writes to the end and returns that size without increasing the size.

Note

See Also

FS_CloseFile
FSFile
FS_GetFileLength
FS_OpenFileEx
FS_OpenFileFast
FS_SeekFile
FS_SeekFileToBegin
FS_SeekFileToEnd

Revision History

2010/01/14 Revised the archives whose size can be increased automatically.
2009/12/11Revised 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