nn::fs::FileOutputStream::SetSize Member Function

Syntax

virtual void SetSize(
     s64 size
);

Parameters

Name Description
in size Specifies the file size.

Return Values

None.

Description

Sets the file size.

This function is implemented to show an error screen when errors occur internally, whether or not such errors are fatal. Control does not return from the function in this case. Use nn::fs::FileOutputStream::TrySetSize on everything other than ROM archives.

To read details about error handling, see Handling Errors During File and Directory Operations.

Note 1

After the size of the file has been extended, if nothing has been written to that region then in principle the process of reading that region returns nn::fs::ResultVerificationFailed.

Note 2

This function cannot be called for expanded save data. The function will return an error if called in this way. See Archives for details about expanded save data.

Revision History

2011/10/25
Added note about calling for expanded save data.
2010/12/24
Added a Note.
Added a link to the page about error handling.
2010/01/29
Initial version.

CONFIDENTIAL