nn::fs::FileStream::TryWrite Member Function

Syntax

virtual Result TryWrite(
     s32 * pOut,
     const void * buffer,
     size_t size,
     bool flush = true
);

Arguments

Name Description
out pOut Stores the actual number of bytes that were written.
in buffer Pointer to the buffer that contains the data to write.
in size Maximum number of bytes to write to the file.
in flush Specifies whether to write back to the device.

Return Values

Returns the result of the operation.

Description

Writes the specified amount of data from a buffer to a file.

Up to size bytes of data are written to the file from the region at the address specified by buffer.

If you have specified a value of false for the flush argument, do not call the Finalize function until you have either called TryFlush or called this function with flush set equal to true.

Error handling will differ, depending on the archive. For details, see Handling Errors During File and Directory Operations.

Revision History

2010/12/22
Added a link to the error handling page.
2010/10/05
Corrected the text.
2010/06/14
Initial version.

CONFIDENTIAL